From 0c2a3cb57f60e2f9d09cf9a8baa1ef798334b270 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Sat, 3 Feb 2024 15:10:56 +1030 Subject: [PATCH] Add n0call changes --- lambda/ham_put_api/__init__.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lambda/ham_put_api/__init__.py b/lambda/ham_put_api/__init__.py index cdb251c..b35bc7f 100644 --- a/lambda/ham_put_api/__init__.py +++ b/lambda/ham_put_api/__init__.py @@ -37,12 +37,12 @@ def telemetry_filter(telemetry): # Returns true for anything that should be hidden def telemetry_hide_filter(telemetry): - # Default Horus Binary callsigns - if telemetry["payload_callsign"] in ['4FSKTEST','4FSKTEST-V2']: + # Default Horus Binary callsigns, and N0CALL + if telemetry["payload_callsign"] in ['4FSKTEST','4FSKTEST-V2','N0CALL']: return True - # Default pysondehub uploader callsign - if telemetry["uploader_callsign"] in ['MYCALL']: + # Default pysondehub uploader callsign, and default 'I haven't changed my config file' callsign. + if telemetry["uploader_callsign"] in ['MYCALL', 'N0CALL']: return True return False @@ -114,6 +114,11 @@ def upload(event, context): # Apply hide field for anything that matches our filters if telemetry_hide_filter(payload): payload["telemetry_hidden"] = True + warnings.append({ + "warning_message": f"Payload telemetry flagged as hidden due to a testing or default payload/uploader callsign being used.", + "payload": payload + }) + if "uploader_position" in payload: if not payload["uploader_position"]: payload.pop("uploader_position")