mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 04:45:24 +03:00
Fix gps error counter so that it is meaningful, it was being reset each
time the gps unit was reinitialised leading users to think there were no GPS errors.
This commit is contained in:
parent
80acc39a46
commit
2778ad0c5d
2 changed files with 8 additions and 3 deletions
|
@ -321,6 +321,11 @@ void showGpsPage() {
|
|||
padLineBuffer();
|
||||
i2c_OLED_set_line(rowIndex++);
|
||||
i2c_OLED_send_string(lineBuffer);
|
||||
|
||||
tfp_sprintf(lineBuffer, "%d cm/s, gc: %d", GPS_speed, GPS_ground_course);
|
||||
padLineBuffer();
|
||||
i2c_OLED_set_line(rowIndex++);
|
||||
i2c_OLED_send_string(lineBuffer);
|
||||
}
|
||||
|
||||
void showBatteryPage(void)
|
||||
|
|
|
@ -179,6 +179,9 @@ void gpsInit(serialConfig_t *initialSerialConfig, gpsConfig_t *initialGpsConfig)
|
|||
}
|
||||
}
|
||||
|
||||
// clear error counter
|
||||
gpsData.errors = 0;
|
||||
|
||||
gpsConfig = initialGpsConfig;
|
||||
|
||||
// init gpsData structure. if we're not actually enabled, don't bother doing anything else
|
||||
|
@ -297,9 +300,6 @@ void gpsInitHardware(void)
|
|||
gpsInitUblox();
|
||||
break;
|
||||
}
|
||||
|
||||
// clear error counter
|
||||
gpsData.errors = 0;
|
||||
}
|
||||
|
||||
void gpsThread(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue