Fix BT output via ozimux.

pull/142/head
Mark Jessop 2019-03-16 22:04:51 +10:30
rodzic 044466f5d9
commit c248837e9f
2 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -36,6 +36,9 @@ class OziUploader(object):
# We require the following fields to be present in the incoming telemetry dictionary data
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']
def __init__(self,
ozimux_port = None,
@ -142,6 +145,13 @@ class OziUploader(object):
'temp': telemetry['temp']
}
# Add in any extra fields we may care about.
for _field in self.EXTRA_FIELDS:
if _field in telemetry:
packet[_field] = telemetry[_field]
# Set up our UDP socket
_s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
_s.settimeout(1)

Wyświetl plik

@ -640,7 +640,6 @@ int main(int argc, char *argv[]) {
}
if (bit != bit0) {
pos0 = pos;
pos = sample_count; //sample_count-(N-1)/2