mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 17:38:32 -04:00
AP_Notify: add gps glitch notification
This commit is contained in:
parent
4c8ec2afaf
commit
f4dec5133e
@ -71,6 +71,7 @@ public:
|
|||||||
uint32_t leak_detected : 1; // 1 if leak detected
|
uint32_t leak_detected : 1; // 1 if leak detected
|
||||||
float battery_voltage ; // battery voltage
|
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_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
|
// additional flags
|
||||||
uint32_t external_leds : 1; // 1 if external LEDs are enabled (normally only used for copter)
|
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
|
// gps failsafe pattern : flashing yellow and blue
|
||||||
// ekf_bad pattern : flashing yellow and red
|
// ekf_bad pattern : flashing yellow and red
|
||||||
if (AP_Notify::flags.failsafe_radio || AP_Notify::flags.failsafe_battery ||
|
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) {
|
switch(step) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
@ -207,6 +207,11 @@ void RGBLed::update_colours(void)
|
|||||||
_red_des = brightness;
|
_red_des = brightness;
|
||||||
_blue_des = _led_off;
|
_blue_des = _led_off;
|
||||||
_green_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{
|
}else{
|
||||||
// all off for radio or battery failsafe
|
// all off for radio or battery failsafe
|
||||||
_red_des = _led_off;
|
_red_des = _led_off;
|
||||||
|
Loading…
Reference in New Issue
Block a user