kopia lustrzana https://github.com/OpenRTX/OpenRTX
Fixed missing gps updates due to recording an update even when one wasn't detected, this meant countdown would restart errantly.
rodzic
dbc86ea392
commit
cf45f7ee81
|
@ -1136,7 +1136,7 @@ void ui_saveState()
|
|||
#ifdef GPS_PRESENT
|
||||
static float priorGPSSpeed = 0;
|
||||
static float priorGPSAltitude = 0;
|
||||
static float priorGPSDirection = 0;
|
||||
static float priorGPSDirection = 500; // impossible value init.
|
||||
static uint32_t vpGPSLastUpdate = 0;
|
||||
|
||||
static vpGPSInfoFlags_t GetGPSDirectionOrSpeedChanged()
|
||||
|
@ -1150,8 +1150,6 @@ static vpGPSInfoFlags_t GetGPSDirectionOrSpeedChanged()
|
|||
if (now - vpGPSLastUpdate < 10000)
|
||||
return vpGPSNone;
|
||||
|
||||
vpGPSLastUpdate=now;
|
||||
|
||||
vpGPSInfoFlags_t whatChanged= vpGPSNone;
|
||||
|
||||
if (state.gps_data.fix_quality != priorGPSFixQuality)
|
||||
|
@ -1187,6 +1185,9 @@ static vpGPSInfoFlags_t GetGPSDirectionOrSpeedChanged()
|
|||
priorGPSDirection = state.gps_data.tmg_true;
|
||||
}
|
||||
|
||||
if (whatChanged)
|
||||
vpGPSLastUpdate=now;
|
||||
|
||||
return whatChanged;
|
||||
}
|
||||
#endif // GPS_PRESENT
|
||||
|
|
Ładowanie…
Reference in New Issue