Browse Source

convert to float

master
Tobias Brunner 8 months ago
parent
commit
99f2208859
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      lgt92.py

+ 5
- 4
lgt92.py View File

@ -99,9 +99,9 @@ def on_message_ttn(client, userdata, msg):
"device": "lgt92",
},
"fields": {
"bat": data["payload_fields"]["batV"],
"pitch": data["payload_fields"]["pitch"],
"roll": data["payload_fields"]["roll"],
"bat": float(data["payload_fields"]["batV"]),
"pitch": float(data["payload_fields"]["pitch"]),
"roll": float(data["payload_fields"]["roll"]),
"lat": data["payload_fields"]["latitude"],
"lon": data["payload_fields"]["longitude"],
"alarm": int(data["payload_fields"]["alarm"]),
@ -181,4 +181,5 @@ if __name__ == '__main__':
client_ttn.loop_forever()
except KeyboardInterrupt:
shutdown()
logging.info("tschuess")
logging.info("tschuess")

Loading…
Cancel
Save