kopia lustrzana https://github.com/projecthorus/chasemapper
Handle condition where log file contains Balloon Telemetry, but ends with something else
rodzic
7dd25c46b7
commit
63347590bf
|
@ -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
|
||||
|
|
|
@ -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. """
|
||||
|
|
Ładowanie…
Reference in New Issue