mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-18 20:57:56 +00:00
Merge pull request #135 from projecthorus/n0call_testing
Add N0CALL to telemetry_hidden payload and uploader callsign lists, send warning if flagged.
This commit is contained in:
commit
310421ddd1
@ -37,12 +37,12 @@ def telemetry_filter(telemetry):
|
|||||||
|
|
||||||
# Returns true for anything that should be hidden
|
# Returns true for anything that should be hidden
|
||||||
def telemetry_hide_filter(telemetry):
|
def telemetry_hide_filter(telemetry):
|
||||||
# Default Horus Binary callsigns
|
# Default Horus Binary callsigns, and N0CALL
|
||||||
if telemetry["payload_callsign"] in ['4FSKTEST','4FSKTEST-V2']:
|
if telemetry["payload_callsign"] in ['4FSKTEST','4FSKTEST-V2','N0CALL']:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Default pysondehub uploader callsign
|
# Default pysondehub uploader callsign, and default 'I haven't changed my config file' callsign.
|
||||||
if telemetry["uploader_callsign"] in ['MYCALL']:
|
if telemetry["uploader_callsign"] in ['MYCALL', 'N0CALL']:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
@ -114,6 +114,11 @@ def upload(event, context):
|
|||||||
# Apply hide field for anything that matches our filters
|
# Apply hide field for anything that matches our filters
|
||||||
if telemetry_hide_filter(payload):
|
if telemetry_hide_filter(payload):
|
||||||
payload["telemetry_hidden"] = True
|
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 "uploader_position" in payload:
|
||||||
if not payload["uploader_position"]:
|
if not payload["uploader_position"]:
|
||||||
payload.pop("uploader_position")
|
payload.pop("uploader_position")
|
||||||
|
Loading…
Reference in New Issue
Block a user