fix: HoTT telemetry GPS latitude sign may be wrong in certain circumstances (#3649)

* evaluate every N/S hemisphere latitude position for setting sign in decimal GPS coordinates

* explicit struct init
This commit is contained in:
Michael
2023-06-08 15:39:05 +10:00
committed by GitHub
parent 687345192b
commit bd89b01370
+2 -4
View File
@@ -453,7 +453,7 @@ void processHottPacket(const uint8_t * packet)
const HottSensor *sensor;
int32_t value;
static uint8_t prev_page = 0, prev_value = 0;
static HottGPSMinutes min = {};
static HottGPSMinutes min = { 0, 0, 0 };
int16_t deg = 0, sec = 0;
// Set RX Event (HoTT warnings)
@@ -557,9 +557,7 @@ void processHottPacket(const uint8_t * packet)
// GPS latitude
min.value = (int16_t) (packet[11] + (packet[12] << 8));
if (packet[10] == 1) {
min.isNegative = true;
}
min.isNegative = (packet[10] == 1);
break;
case HOTT_PAGE_02: