mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Enable using of any RC channel to set the color hue modifier.
Can be set via MSP (bumped to version 22) New CLI command: mode_color 7 0 AUX_Channel AUX_Channel: ROLL = 0 PITCH = 1 YAW = 2 THROTTLE = 3 AUX1 = 4 AUX2 = 5 AUX3 = 6 AUX4 = 7 AUX5 = 8 AUX6 = 9 AUX7 = 10 AUX8 = 11 Fixed CLI defaults printing for #1019.
This commit is contained in:
parent
bd1d96dff9
commit
431295ab21
7 changed files with 24 additions and 5 deletions
|
@ -1795,13 +1795,18 @@ static void printModeColor(uint8_t dumpMask, master_t *defaultConfig)
|
|||
}
|
||||
}
|
||||
|
||||
const char *format = "mode_color %u %u %u\r\n";
|
||||
for (uint32_t j = 0; j < LED_SPECIAL_COLOR_COUNT; j++) {
|
||||
int colorIndex = masterConfig.specialColors.color[j];
|
||||
int colorIndexDefault = defaultConfig->specialColors.color[j];
|
||||
const char *format = "mode_color %u %u %u\r\n";
|
||||
cliDefaultPrintf(dumpMask, colorIndex == colorIndexDefault, format, LED_SPECIAL, j, colorIndexDefault);
|
||||
cliDumpPrintf(dumpMask, colorIndex == colorIndexDefault, format, LED_SPECIAL, j, colorIndex);
|
||||
}
|
||||
|
||||
int ledStripAuxChannel = masterConfig.ledstrip_aux_channel;
|
||||
int ledStripAuxChannelDefault = defaultConfig->ledstrip_aux_channel;
|
||||
cliDefaultPrintf(dumpMask, ledStripAuxChannel == ledStripAuxChannelDefault, format, LED_AUX_CHANNEL, 0, ledStripAuxChannelDefault);
|
||||
cliDumpPrintf(dumpMask, ledStripAuxChannel == ledStripAuxChannelDefault, format, LED_AUX_CHANNEL, 0, ledStripAuxChannel);
|
||||
}
|
||||
|
||||
static void cliModeColor(char *cmdline)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue