From e71607553177bb895bac0584e70aa40db2d00570 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Fri, 2 Feb 2018 17:30:10 +1030 Subject: [PATCH] Filter out all but WENET packets from TelemetryGUI, change wenet udp broadcast port to align with horus_utils. --- rx/TelemetryGUI.py | 6 +++++- rx/WenetPackets.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rx/TelemetryGUI.py b/rx/TelemetryGUI.py index ca7117f..1a11d3e 100644 --- a/rx/TelemetryGUI.py +++ b/rx/TelemetryGUI.py @@ -309,7 +309,11 @@ def process_udp(udp_packet): # Parse JSON, and extract packet. packet_dict = json.loads(udp_packet) - packet = packet_dict['packet'] + # Discard all but Wenet packets + if packet_dict['type'] == 'WENET': + packet = packet_dict['packet'] + else: + return # Decode GPS and IMU packets, and pass onto their respective GUI update functions. packet_type = decode_packet_type(packet) diff --git a/rx/WenetPackets.py b/rx/WenetPackets.py index fb7d44f..679279e 100644 --- a/rx/WenetPackets.py +++ b/rx/WenetPackets.py @@ -15,7 +15,7 @@ from hashlib import sha256 from base64 import b64encode WENET_IMAGE_UDP_PORT = 7890 -WENET_TELEMETRY_UDP_PORT = 7891 +WENET_TELEMETRY_UDP_PORT = 55672 class WENET_PACKET_TYPES: TEXT_MESSAGE = 0x00