missed a few

This commit is contained in:
Thomas Göttgens 2023-01-21 18:46:17 +01:00
parent cdf379616c
commit c53c87499b

View File

@ -134,14 +134,14 @@ void MeshService::handleToRadio(meshtastic_MeshPacket &p)
{ {
#ifdef ARCH_PORTDUINO #ifdef ARCH_PORTDUINO
// Simulates device is receiving a packet via the LoRa chip // Simulates device is receiving a packet via the LoRa chip
if (p.decoded.portnum == PortNum_SIMULATOR_APP) { if (p.decoded.portnum == meshtastic_PortNum_SIMULATOR_APP) {
// Simulator packet (=Compressed packet) is encapsulated in a MeshPacket, so need to unwrap first // Simulator packet (=Compressed packet) is encapsulated in a MeshPacket, so need to unwrap first
Compressed scratch; meshtastic_Compressed scratch;
Compressed *decoded = NULL; meshtastic_Compressed *decoded = NULL;
if (p.which_payload_variant == MeshPacket_decoded_tag) { if (p.which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
memset(&scratch, 0, sizeof(scratch)); memset(&scratch, 0, sizeof(scratch));
p.decoded.payload.size = p.decoded.payload.size =
pb_decode_from_bytes(p.decoded.payload.bytes, p.decoded.payload.size, &Compressed_msg, &scratch); pb_decode_from_bytes(p.decoded.payload.bytes, p.decoded.payload.size, &meshtastic_Compressed_msg, &scratch);
if (p.decoded.payload.size) { if (p.decoded.payload.size) {
decoded = &scratch; decoded = &scratch;
// Extract the original payload and replace // Extract the original payload and replace