From c672abda3e9dc6e1af5e45f6bf4464c70fb89fb3 Mon Sep 17 00:00:00 2001 From: raul-ortega Date: Wed, 1 Nov 2017 23:53:40 +0100 Subject: [PATCH] Using absolute altitude instead of relative. --- src/main/tracker/pitlab.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/tracker/pitlab.c b/src/main/tracker/pitlab.c index 1c51560..4aa4c5f 100644 --- a/src/main/tracker/pitlab.c +++ b/src/main/tracker/pitlab.c @@ -94,18 +94,18 @@ void preProcessHexString(void){ void processPitlabFrame(void){ switch(lsRxData[0]) { - case 0: + case 0: // A telemetry_sats = (uint16_t)Restore_byte(4); break; - case 1: - telemetry_alt = (int16_t)Restore_short(2); + case 10: // 10 = K, pos 3 : Absolute altitude, 1 = B, pos 2 : Relative altitude + telemetry_alt = (int16_t)Restore_short(3); gotAlt = true; break; - case 2: + case 2: // C gps_lon = Restore_long(1); telemetry_lon = (int32_t)(round(((double)gps_lon * 100.0)/60.0)); break; - case 3: + case 3: // D gps_lat = Restore_long(1); telemetry_lat = (int32_t)(round(((double)gps_lat * 100.0)/60.0)); if(telemetry_sats >= 5) gotFix = true;