1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +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:
Dominic Clifton 2014-12-11 16:31:14 +00:00
parent 80acc39a46
commit 2778ad0c5d
2 changed files with 8 additions and 3 deletions

View file

@ -321,6 +321,11 @@ void showGpsPage() {
padLineBuffer(); padLineBuffer();
i2c_OLED_set_line(rowIndex++); i2c_OLED_set_line(rowIndex++);
i2c_OLED_send_string(lineBuffer); 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) void showBatteryPage(void)

View file

@ -179,6 +179,9 @@ void gpsInit(serialConfig_t *initialSerialConfig, gpsConfig_t *initialGpsConfig)
} }
} }
// clear error counter
gpsData.errors = 0;
gpsConfig = initialGpsConfig; gpsConfig = initialGpsConfig;
// init gpsData structure. if we're not actually enabled, don't bother doing anything else // init gpsData structure. if we're not actually enabled, don't bother doing anything else
@ -297,9 +300,6 @@ void gpsInitHardware(void)
gpsInitUblox(); gpsInitUblox();
break; break;
} }
// clear error counter
gpsData.errors = 0;
} }
void gpsThread(void) void gpsThread(void)