From e5d2ea4bcbb8a410f12fcec39c32505223f8ac1b Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 10 Sep 2025 19:24:44 -0700 Subject: [PATCH] Update system.py --- modules/system.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/system.py b/modules/system.py index 6dcd3ae..ffa46cc 100644 --- a/modules/system.py +++ b/modules/system.py @@ -1012,9 +1012,10 @@ def consumeMetadata(packet, rxNode=0): if highfly_check_openskynetwork: # check get_openskynetwork to see if the node is an aircraft - flight_info = get_openskynetwork(position_data.get('latitude', 0), position_data.get('longitude', 0), position_data.get('altitude', 0)) - if flight_info and NO_ALERTS not in flight_info and ERROR_FETCHING_DATA not in flight_info: - msg += f"\n✈️Detected near: {flight_info}" + if 'latitude' in position_data and 'longitude' in position_data: + flight_info = get_openskynetwork(position_data.get('latitude', 0), position_data.get('longitude', 0)) + if flight_info and NO_ALERTS not in flight_info and ERROR_FETCHING_DATA not in flight_info: + msg += f"\n✈️Detected near: {flight_info}" send_message(msg, highfly_channel, 0, highfly_interface) time.sleep(responseDelay)