Merge pull request #7162 from TonyBlit/gps_osd_blink
Blink GPS indicator on OSD when numsats is lower than minimum configu…
This commit is contained in:
commit
c119843785
|
@ -68,6 +68,7 @@
|
|||
#include "fc/rc.h"
|
||||
#include "fc/runtime_config.h"
|
||||
|
||||
#include "flight/gps_rescue.h"
|
||||
#include "flight/failsafe.h"
|
||||
#include "flight/position.h"
|
||||
#include "flight/imu.h"
|
||||
|
@ -1328,11 +1329,13 @@ void osdUpdateAlarms(void)
|
|||
SET_BLINK(OSD_AVG_CELL_VOLTAGE);
|
||||
}
|
||||
|
||||
if (STATE(GPS_FIX) == 0) {
|
||||
#ifdef USE_GPS
|
||||
if ((STATE(GPS_FIX) == 0) || ((gpsSol.numSat < gpsRescueConfig()->minSats) && gpsRescueIsConfigured())) {
|
||||
SET_BLINK(OSD_GPS_SATS);
|
||||
} else {
|
||||
CLR_BLINK(OSD_GPS_SATS);
|
||||
}
|
||||
#endif //USE_GPS
|
||||
|
||||
for (int i = 0; i < OSD_TIMER_COUNT; i++) {
|
||||
const uint16_t timer = osdConfig()->timers[i];
|
||||
|
|
|
@ -45,6 +45,7 @@ extern "C" {
|
|||
#include "fc/rc_modes.h"
|
||||
#include "fc/runtime_config.h"
|
||||
|
||||
#include "flight/gps_rescue.h"
|
||||
#include "flight/pid.h"
|
||||
#include "flight/imu.h"
|
||||
|
||||
|
@ -86,6 +87,7 @@ extern "C" {
|
|||
PG_REGISTER(blackboxConfig_t, blackboxConfig, PG_BLACKBOX_CONFIG, 0);
|
||||
PG_REGISTER(systemConfig_t, systemConfig, PG_SYSTEM_CONFIG, 0);
|
||||
PG_REGISTER(pilotConfig_t, pilotConfig, PG_PILOT_CONFIG, 0);
|
||||
PG_REGISTER(gpsRescueConfig_t, gpsRescueConfig, PG_GPS_RESCUE, 0);
|
||||
|
||||
timeUs_t simulationTime = 0;
|
||||
batteryState_e simulationBatteryState;
|
||||
|
@ -1076,4 +1078,5 @@ extern "C" {
|
|||
bool areMotorsRunning(void){ return true; }
|
||||
bool pidOsdAntiGravityActive(void) { return false; }
|
||||
bool failsafeIsActive(void) { return false; }
|
||||
bool gpsRescueIsConfigured(void) { return false; }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue