diff --git a/libraries/AP_Notify/AP_Notify.h b/libraries/AP_Notify/AP_Notify.h index 8e4924ff2ddac9ea0a46f52a9cf5c0f5d3011638..594094e6fd441e8a0311dae556d951b8d3f8903c 100644 --- a/libraries/AP_Notify/AP_Notify.h +++ b/libraries/AP_Notify/AP_Notify.h @@ -38,6 +38,7 @@ public: uint16_t baro_glitching : 1; // 1 if baro altitude is not good uint16_t armed : 1; // 0 = disarmed, 1 = armed uint16_t pre_arm_check : 1; // 0 = failing checks, 1 = passed + uint16_t pre_arm_gps_check : 1; // 0 = failing pre-arm GPS checks, 1 = passed uint16_t save_trim : 1; // 1 if gathering trim data uint16_t esc_calibration : 1; // 1 if calibrating escs uint16_t failsafe_radio : 1; // 1 if radio failsafe diff --git a/libraries/AP_Notify/ToshibaLED.cpp b/libraries/AP_Notify/ToshibaLED.cpp index 1460c0538ea0ca472525c6bf364bf9c4893703a3..72341c1d8637357cdb2fee5f8566e03e4c7a1ef2 100644 --- a/libraries/AP_Notify/ToshibaLED.cpp +++ b/libraries/AP_Notify/ToshibaLED.cpp @@ -223,32 +223,34 @@ void ToshibaLED::update_colours(void) break; } }else{ - // flashing green if disarmed with GPS 3d lock - // flashing blue if disarmed with no gps lock + // fast flashing green if disarmed with GPS 3D lock and DGPS + // slow flashing green if disarmed with GPS 3d lock (and no DGPS) + // flashing blue if disarmed with no gps lock or gps pre_arm checks have failed + bool fast_green = AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D_DGPS && AP_Notify::flags.pre_arm_gps_check; switch(step) { case 0: - if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D_DGPS) { + if (fast_green) { _green_des = brightness; } break; case 1: - if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D_DGPS) { + if (fast_green) { _green_des = TOSHIBA_LED_OFF; } break; case 2: - if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D_DGPS) { + if (fast_green) { _green_des = brightness; } break; case 3: - if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D_DGPS) { + if (fast_green) { _green_des = TOSHIBA_LED_OFF; } break; case 4: _red_des = TOSHIBA_LED_OFF; - if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D) { + if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D && AP_Notify::flags.pre_arm_gps_check) { // flashing green if disarmed with GPS 3d lock _blue_des = TOSHIBA_LED_OFF; _green_des = brightness; @@ -259,24 +261,24 @@ void ToshibaLED::update_colours(void) } break; case 5: - if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D_DGPS) { + if (fast_green) { _green_des = TOSHIBA_LED_OFF; } break; case 6: - if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D_DGPS) { + if (fast_green) { _green_des = brightness; } break; case 7: - if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D_DGPS) { + if (fast_green) { _green_des = TOSHIBA_LED_OFF; } break; case 8: - if (AP_Notify::flags.gps_status >= AP_GPS::GPS_OK_FIX_3D_DGPS) { + if (fast_green) { _green_des = brightness; } break;