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