Handle condition where log file contains Balloon Telemetry, but ends with something else

pull/26/head
David Rollinson 2021-01-10 20:00:05 +08:00
rodzic 7dd25c46b7
commit 63347590bf
2 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -49,7 +49,7 @@ def read_last_balloon_telemetry():
for _entry in log:
if _entry['log_type'] == "BALLOON TELEMETRY":
telemetry_found = True
_last_telemetry = _entry
if telemetry_found == True:
logging.info("Last balloon telemetry at %s, %s, %.5f, %.5f" % (_entry['callsign'], _entry['time'], _entry['lat'],_entry['lon']))
_entry['time_dt'] = parse(_entry.pop('time'))
return _entry
_last_telemetry['time_dt'] = parse(_last_telemetry.pop('time'))
return _last_telemetry

Wyświetl plik

@ -273,7 +273,8 @@ def handle_new_payload_position(data, log_position = True):
# Add the position into the logger
if chase_logger and log_position:
chase_logger.add_balloon_telemetry(data)
else :
logging.info("Point not logged")
def handle_modem_stats(data):
""" Basic handling of modem statistics data. If it matches a known payload, send the info to the client. """