mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Notify: RGBLed: rename OFF define
This commit is contained in:
parent
2e4b61d96e
commit
0f2c06d798
@ -166,7 +166,7 @@ uint32_t RGBLed::get_colour_sequence(void) const
|
||||
uint32_t RGBLed::get_colour_sequence_traffic_light(void) const
|
||||
{
|
||||
if (AP_Notify::flags.initialising) {
|
||||
return DEFINE_COLOUR_SEQUENCE(RED,GREEN,BLUE,RED,GREEN,BLUE,RED,GREEN,BLUE,OFF);
|
||||
return DEFINE_COLOUR_SEQUENCE(RED,GREEN,BLUE,RED,GREEN,BLUE,RED,GREEN,BLUE,BLACK);
|
||||
}
|
||||
|
||||
if (AP_Notify::flags.armed) {
|
||||
@ -175,14 +175,14 @@ uint32_t RGBLed::get_colour_sequence_traffic_light(void) const
|
||||
|
||||
if (hal.util->safety_switch_state() != AP_HAL::Util::SAFETY_DISARMED) {
|
||||
if (!AP_Notify::flags.pre_arm_check) {
|
||||
return DEFINE_COLOUR_SEQUENCE_ALTERNATE(YELLOW, OFF);
|
||||
return DEFINE_COLOUR_SEQUENCE_ALTERNATE(YELLOW, BLACK);
|
||||
} else {
|
||||
return DEFINE_COLOUR_SEQUENCE_SLOW(YELLOW);
|
||||
}
|
||||
}
|
||||
|
||||
if (!AP_Notify::flags.pre_arm_check) {
|
||||
return DEFINE_COLOUR_SEQUENCE_ALTERNATE(GREEN, OFF);
|
||||
return DEFINE_COLOUR_SEQUENCE_ALTERNATE(GREEN, BLACK);
|
||||
}
|
||||
return DEFINE_COLOUR_SEQUENCE_SLOW(GREEN);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ private:
|
||||
((S0) << (0*3) | (S1) << (1*3) | (S2) << (2*3) | (S3) << (3*3) | (S4) << (4*3) | (S5) << (5*3) | (S6) << (6*3) | (S7) << (7*3) | (S8) << (8*3) | (S9) << (9*3))
|
||||
|
||||
#define DEFINE_COLOUR_SEQUENCE_SLOW(colour) \
|
||||
DEFINE_COLOUR_SEQUENCE(colour,colour,colour,colour,colour,OFF,OFF,OFF,OFF,OFF)
|
||||
DEFINE_COLOUR_SEQUENCE(colour,colour,colour,colour,colour,BLACK,BLACK,BLACK,BLACK,BLACK)
|
||||
#define DEFINE_COLOUR_SEQUENCE_FAILSAFE(colour) \
|
||||
DEFINE_COLOUR_SEQUENCE(YELLOW,YELLOW,YELLOW,YELLOW,YELLOW,colour,colour,colour,colour,colour)
|
||||
#define DEFINE_COLOUR_SEQUENCE_SOLID(colour) \
|
||||
@ -86,7 +86,7 @@ private:
|
||||
#define DEFINE_COLOUR_SEQUENCE_ALTERNATE(colour1, colour2) \
|
||||
DEFINE_COLOUR_SEQUENCE(colour1,colour2,colour1,colour2,colour1,colour2,colour1,colour2,colour1,colour2)
|
||||
|
||||
#define OFF 0
|
||||
#define BLACK 0
|
||||
#define BLUE 1
|
||||
#define GREEN 2
|
||||
#define RED 4
|
||||
@ -94,16 +94,16 @@ private:
|
||||
#define WHITE (RED|GREEN|BLUE)
|
||||
|
||||
const uint32_t sequence_initialising = DEFINE_COLOUR_SEQUENCE_ALTERNATE(RED,BLUE);
|
||||
const uint32_t sequence_trim_or_esc = DEFINE_COLOUR_SEQUENCE(RED,BLUE,GREEN,RED,BLUE,GREEN,RED,BLUE,GREEN,OFF);
|
||||
const uint32_t sequence_trim_or_esc = DEFINE_COLOUR_SEQUENCE(RED,BLUE,GREEN,RED,BLUE,GREEN,RED,BLUE,GREEN,BLACK);
|
||||
const uint32_t sequence_failsafe_leak = DEFINE_COLOUR_SEQUENCE_FAILSAFE(WHITE);
|
||||
const uint32_t sequence_failsafe_ekf = DEFINE_COLOUR_SEQUENCE_FAILSAFE(RED);
|
||||
const uint32_t sequence_failsafe_gps_glitching = DEFINE_COLOUR_SEQUENCE_FAILSAFE(BLUE);
|
||||
const uint32_t sequence_failsafe_radio_or_battery = DEFINE_COLOUR_SEQUENCE_FAILSAFE(OFF);
|
||||
const uint32_t sequence_failsafe_radio_or_battery = DEFINE_COLOUR_SEQUENCE_FAILSAFE(BLACK);
|
||||
|
||||
const uint32_t sequence_armed = DEFINE_COLOUR_SEQUENCE_SOLID(GREEN);
|
||||
const uint32_t sequence_armed_nogps = DEFINE_COLOUR_SEQUENCE_SOLID(BLUE);
|
||||
const uint32_t sequence_prearm_failing = DEFINE_COLOUR_SEQUENCE(YELLOW,YELLOW,OFF,OFF,YELLOW,YELLOW,OFF,OFF,OFF,OFF);
|
||||
const uint32_t sequence_disarmed_good_dgps = DEFINE_COLOUR_SEQUENCE_ALTERNATE(GREEN,OFF);
|
||||
const uint32_t sequence_prearm_failing = DEFINE_COLOUR_SEQUENCE(YELLOW,YELLOW,BLACK,BLACK,YELLOW,YELLOW,BLACK,BLACK,BLACK,BLACK);
|
||||
const uint32_t sequence_disarmed_good_dgps = DEFINE_COLOUR_SEQUENCE_ALTERNATE(GREEN,BLACK);
|
||||
const uint32_t sequence_disarmed_good_gps = DEFINE_COLOUR_SEQUENCE_SLOW(GREEN);
|
||||
const uint32_t sequence_disarmed_bad_gps = DEFINE_COLOUR_SEQUENCE_SLOW(BLUE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user