mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 07:50:36 +08:00
led: add MODE_FLASH
This commit is contained in:
@@ -82,6 +82,7 @@ $ led_control blink -c blue -l 0 -n 5
|
||||
PRINT_MODULE_USAGE_PARAM_INT('n', 3, 1, 20, "Number of blinks", true);
|
||||
PRINT_MODULE_USAGE_PARAM_STRING('s', "normal", "fast|normal|slow", "Set blinking speed", true);
|
||||
PRINT_MODULE_USAGE_COMMAND_DESCR("breathe", "Continuously fade LED in & out");
|
||||
PRINT_MODULE_USAGE_COMMAND_DESCR("flash", "Two fast blinks and then off with frequency of 1Hz");
|
||||
|
||||
PRINT_MODULE_USAGE_PARAM_COMMENT("The following arguments apply to all of the above commands except for 'test':");
|
||||
PRINT_MODULE_USAGE_PARAM_STRING('c', "white", "red|blue|green|yellow|purple|amber|cyan|white", "color", true);
|
||||
@@ -259,6 +260,9 @@ led_control_main(int argc, char *argv[])
|
||||
} else if (!strcmp(argv[myoptind], "breathe")) {
|
||||
led_control.mode = led_control_s::MODE_BREATHE;
|
||||
|
||||
} else if (!strcmp(argv[myoptind], "flash")) {
|
||||
led_control.mode = led_control_s::MODE_FLASH;
|
||||
|
||||
} else {
|
||||
usage();
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user