mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +03:00
Add LED profile feature - 4278
This commit is contained in:
parent
e0fc9300ed
commit
4ec536a317
15 changed files with 333 additions and 101 deletions
|
@ -1579,7 +1579,7 @@ static void cliRxRange(char *cmdline)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef USE_LED_STRIP
|
||||
#ifdef USE_LED_STRIP_STATUS_MODE
|
||||
static void printLed(uint8_t dumpMask, const ledConfig_t *ledConfigs, const ledConfig_t *defaultLedConfigs)
|
||||
{
|
||||
const char *format = "led %u %s";
|
||||
|
@ -4657,7 +4657,7 @@ static void printConfig(char *cmdline, bool doDiff)
|
|||
cliPrintHashLine("serial");
|
||||
printSerial(dumpMask, &serialConfig_Copy, serialConfig());
|
||||
|
||||
#ifdef USE_LED_STRIP
|
||||
#ifdef USE_LED_STRIP_STATUS_MODE
|
||||
cliPrintHashLine("led");
|
||||
printLed(dumpMask, ledStripConfig_Copy.ledConfigs, ledStripConfig()->ledConfigs);
|
||||
|
||||
|
@ -4818,8 +4818,8 @@ const clicmd_t cmdTable[] = {
|
|||
#if defined(USE_BOARD_INFO)
|
||||
CLI_COMMAND_DEF("board_name", "get / set the name of the board model", "[board name]", cliBoardName),
|
||||
#endif
|
||||
#ifdef USE_LED_STRIP
|
||||
CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor),
|
||||
#ifdef USE_LED_STRIP_STATUS_MODE
|
||||
CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor),
|
||||
#endif
|
||||
CLI_COMMAND_DEF("defaults", "reset to defaults and reboot", "[nosave]", cliDefaults),
|
||||
CLI_COMMAND_DEF("diff", "list configuration changes from default", "[master|profile|rates|all] {defaults}", cliDiff),
|
||||
|
@ -4857,8 +4857,8 @@ const clicmd_t cmdTable[] = {
|
|||
CLI_COMMAND_DEF("gyroregisters", "dump gyro config registers contents", NULL, cliDumpGyroRegisters),
|
||||
#endif
|
||||
CLI_COMMAND_DEF("help", NULL, NULL, cliHelp),
|
||||
#ifdef USE_LED_STRIP
|
||||
CLI_COMMAND_DEF("led", "configure leds", NULL, cliLed),
|
||||
#ifdef USE_LED_STRIP_STATUS_MODE
|
||||
CLI_COMMAND_DEF("led", "configure leds", NULL, cliLed),
|
||||
#endif
|
||||
#if defined(USE_BOARD_INFO)
|
||||
CLI_COMMAND_DEF("manufacturer_id", "get / set the id of the board manufacturer", "[manufacturer id]", cliManufacturerId),
|
||||
|
@ -4869,7 +4869,7 @@ const clicmd_t cmdTable[] = {
|
|||
CLI_COMMAND_DEF("mixer", "configure mixer", "list\r\n\t<name>", cliMixer),
|
||||
#endif
|
||||
CLI_COMMAND_DEF("mmix", "custom motor mixer", NULL, cliMotorMix),
|
||||
#ifdef USE_LED_STRIP
|
||||
#ifdef USE_LED_STRIP_STATUS_MODE
|
||||
CLI_COMMAND_DEF("mode_color", "configure mode and special colors", NULL, cliModeColor),
|
||||
#endif
|
||||
CLI_COMMAND_DEF("motor", "get/set motor", "<index> [<value>]", cliMotor),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue