From fc0e83bcab1211e1affd4ccb733ff045e9e8d096 Mon Sep 17 00:00:00 2001 From: sm3ulc Date: Tue, 19 Jan 2021 18:57:09 +0100 Subject: [PATCH] new wsprnet format --- telemetry.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/telemetry.py b/telemetry.py index a831140..7d81f7f 100644 --- a/telemetry.py +++ b/telemetry.py @@ -376,7 +376,6 @@ def send_tlm_to_habitat(sentence, callsign, spot_time): date_created = spot_time.isoformat("T") + "Z" date = datetime.datetime.utcnow().isoformat("T") + "Z" - data = { "type": "payload_telemetry", "data": { @@ -390,7 +389,6 @@ def send_tlm_to_habitat(sentence, callsign, spot_time): }, } - h = httplib2.Http("") resp, content = h.request( @@ -579,10 +577,14 @@ def process_telemetry(spots, balloons, habhub_callsign, push_habhub, push_aprs): if not checkifsentdb(telestr): # print("Unsent spot", telestr) + print(push_habhub) + # push_habhub = True if push_habhub: # Send telemetry to habhub # send_tlm_to_habitat2(telestr, habhub_callsign) - send_tlm_to_habitat(telestr, habhub_callsign, spot_time) + send_tlm_to_habitat(telestr, habhub_callsign, spot_time) + else: + logging.info("Not pushing to habhub") if push_aprs: # Prep and push basic data to aprs.fi @@ -593,7 +595,8 @@ def process_telemetry(spots, balloons, habhub_callsign, push_habhub, push_aprs): sonde_data["alt"] = telemetry['alt'] logging.info("Pushing data to aprs.fi") push_balloon_to_aprs(sonde_data) - + else: + logging.info("Not pushing to aprs.fi") # Add sent string to history-db addsentdb(balloon_name, row[0], telestr)