mirror of https://github.com/ArduPilot/ardupilot
AP_Notify: add gps glitch notification
This commit is contained in:
parent
52bf93dd80
commit
0d5c98ad45
|
@ -76,6 +76,7 @@ public:
|
|||
uint32_t leak_detected : 1; // 1 if leak detected
|
||||
float battery_voltage ; // battery voltage
|
||||
uint32_t gps_fusion : 1; // 0 = GPS fix rejected by EKF, not usable for flight. 1 = GPS in use by EKF, usable for flight
|
||||
uint32_t gps_glitching : 1; // 1 if gps is glitching
|
||||
|
||||
// additional flags
|
||||
uint32_t external_leds : 1; // 1 if external LEDs are enabled (normally only used for copter)
|
||||
|
|
|
@ -180,7 +180,7 @@ void RGBLed::update_colours(void)
|
|||
// gps failsafe pattern : flashing yellow and blue
|
||||
// ekf_bad pattern : flashing yellow and red
|
||||
if (AP_Notify::flags.failsafe_radio || AP_Notify::flags.failsafe_battery ||
|
||||
AP_Notify::flags.ekf_bad || AP_Notify::flags.leak_detected) {
|
||||
AP_Notify::flags.ekf_bad || AP_Notify::flags.gps_glitching || AP_Notify::flags.leak_detected) {
|
||||
switch(step) {
|
||||
case 0:
|
||||
case 1:
|
||||
|
@ -207,6 +207,11 @@ void RGBLed::update_colours(void)
|
|||
_red_des = brightness;
|
||||
_blue_des = _led_off;
|
||||
_green_des = _led_off;
|
||||
} else if (AP_Notify::flags.gps_glitching) {
|
||||
// blue on gps glitch
|
||||
_red_des = _led_off;
|
||||
_blue_des = brightness;
|
||||
_green_des = _led_off;
|
||||
}else{
|
||||
// all off for radio or battery failsafe
|
||||
_red_des = _led_off;
|
||||
|
|
Loading…
Reference in New Issue