From 43a5163b77d0ff832afb905f9625f8ae0e58a611 Mon Sep 17 00:00:00 2001 From: Totoo Date: Tue, 18 Nov 2025 12:07:40 +0100 Subject: [PATCH] prevent sonde pos to change to 0 when the frame is invalid. fixes #2862 (#2869) --- firmware/application/apps/ui_sonde.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/firmware/application/apps/ui_sonde.cpp b/firmware/application/apps/ui_sonde.cpp index f5aa030ac..ff927076b 100644 --- a/firmware/application/apps/ui_sonde.cpp +++ b/firmware/application/apps/ui_sonde.cpp @@ -174,10 +174,11 @@ void SondeView::on_packet(const sonde::Packet& packet) { gps_info = packet.get_GPS_data(); - geopos.set_altitude(gps_info.alt); - geopos.set_lat(gps_info.lat); - geopos.set_lon(gps_info.lon); - + if (gps_info.lat != 0 && gps_info.lon != 0) { // only update when valid, to prevent flashing + geopos.set_altitude(gps_info.alt); + geopos.set_lat(gps_info.lat); + geopos.set_lon(gps_info.lon); + } if (logger && logging) { logger->on_packet(packet); }