Merge pull request #27 from dbrooke/json_enhancements

Add support for PAYLOAD_TELEMETRY message used by PITS LoRa gateway
pull/29/head
Mark Jessop 2021-01-27 09:06:08 +10:30 zatwierdzone przez GitHub
commit 07914ba8b1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -95,6 +95,12 @@ class UDPListener(object):
if self.summary_callback is not None:
self.summary_callback(packet_dict)
if packet_dict["type"] == "PAYLOAD_TELEMETRY":
if "time_string" in packet_dict.keys():
packet_dict["time"] = packet_dict["time_string"]
if self.summary_callback is not None:
self.summary_callback(packet_dict)
if packet_dict["type"] == "GPS":
if self.gps_callback is not None:
self.gps_callback(packet_dict)