Skip to content

Commit

Permalink
Fixed endless loop in getMqttData()
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Nov 16, 2024
1 parent db223f9 commit 6b414c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/Waveshare_7_5_T7_Sensors/MqttInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ void MqttInterface::getMqttData(mqtt_sensors_t &MqttSensors)
strncpy(MqttSensors.received_at, received_at, 30);
}
f_port = doc["uplink_message"]["f_port"];
if (f_port != 1)
{
// Wrong f_port, retrying...
mqttMessageReceived = false;
}
} while (f_port != 1);
JsonVariant payload = doc["uplink_message"]["decoded_payload"]["bytes"];

Expand Down

0 comments on commit 6b414c4

Please sign in to comment.