diff --git a/cpp/telemetry_common.h b/cpp/telemetry_common.h index e94a4ba..6bd0295 100644 --- a/cpp/telemetry_common.h +++ b/cpp/telemetry_common.h @@ -12,6 +12,7 @@ struct TelemetryPacket1 { #pragma pack(push, 1) struct TelemetryPacket2 { + uint32_t time_stamp; float vbat; float teng; float lat; diff --git a/python/telemetry_common.py b/python/telemetry_common.py index 518aa9e..577dbbc 100644 --- a/python/telemetry_common.py +++ b/python/telemetry_common.py @@ -9,7 +9,7 @@ UART_MAGIC = b"\xAA\x55\xAA\x55" LORA_HEADER_FORMAT = " TelemetryPacket1: def unpack_packet2(payload: bytes) -> TelemetryPacket2: - vbat, teng, lat, lng, speed = struct.unpack(PACKET2_FORMAT, payload[:PACKET2_SIZE]) - return TelemetryPacket2(vbat, teng, lat, lng, speed) + time_stamp, vbat, teng, lat, lng, speed = struct.unpack(PACKET2_FORMAT, payload[:PACKET2_SIZE]) + return TelemetryPacket2(time_stamp, vbat, teng, lat, lng, speed)