kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
Pass battery voltage information out via udp message. Change example default UDP port to 55673.
rodzic
da14b6c11e
commit
746adecf8c
|
@ -37,7 +37,7 @@ class OziUploader(object):
|
|||
REQUIRED_FIELDS = ['frame', 'id', 'datetime', 'lat', 'lon', 'alt', 'temp', 'type', 'freq', 'freq_float', 'datetime_dt']
|
||||
|
||||
# Extra fields we can pass on to other programs.
|
||||
EXTRA_FIELDS = ['bt', 'humidity', 'sats']
|
||||
EXTRA_FIELDS = ['bt', 'humidity', 'sats', 'batt']
|
||||
|
||||
|
||||
def __init__(self,
|
||||
|
|
|
@ -36,7 +36,7 @@ class UDPListener(object):
|
|||
callback=None,
|
||||
summary_callback = None,
|
||||
gps_callback = None,
|
||||
port=55672):
|
||||
port=55673):
|
||||
|
||||
self.udp_port = port
|
||||
self.callback = callback
|
||||
|
@ -75,7 +75,7 @@ class UDPListener(object):
|
|||
except:
|
||||
pass
|
||||
self.s.bind(('',self.udp_port))
|
||||
print("Started UDP Listener Thread.")
|
||||
print("Started UDP Listener Thread on port %d." % self.udp_port)
|
||||
self.udp_listener_running = True
|
||||
|
||||
# Loop and continue to receive UDP packets.
|
||||
|
@ -137,7 +137,7 @@ if __name__ == '__main__':
|
|||
|
||||
# Instantiate the UDP listener.
|
||||
udp_rx = UDPListener(
|
||||
port=55672,
|
||||
port=55673,
|
||||
callback = handle_payload_summary
|
||||
)
|
||||
# and start it
|
||||
|
|
Ładowanie…
Reference in New Issue