1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 14:55:21 +03:00

Fixed build for exotic targets.

This commit is contained in:
mikeller 2018-05-31 19:43:46 +12:00
parent 7e8f261436
commit f307bf3134
2 changed files with 11 additions and 7 deletions

View file

@ -4018,15 +4018,15 @@ static void printConfig(char *cmdline, bool doDiff)
cliPrintHashLine("feature"); cliPrintHashLine("feature");
printFeature(dumpMask, &featureConfig_Copy, featureConfig()); printFeature(dumpMask, &featureConfig_Copy, featureConfig());
#ifdef USE_BEEPER #if defined(USE_BEEPER)
cliPrintHashLine("beeper"); cliPrintHashLine("beeper");
printBeeper(dumpMask, beeperConfig_Copy.beeper_off_flags, beeperConfig()->beeper_off_flags, "beeper"); printBeeper(dumpMask, beeperConfig_Copy.beeper_off_flags, beeperConfig()->beeper_off_flags, "beeper");
#endif
#ifdef USE_DSHOT #if defined(USE_DSHOT)
cliPrintHashLine("beacon"); cliPrintHashLine("beacon");
printBeeper(dumpMask, beeperConfig_Copy.dshotBeaconOffFlags, beeperConfig()->dshotBeaconOffFlags, "beacon"); printBeeper(dumpMask, beeperConfig_Copy.dshotBeaconOffFlags, beeperConfig()->dshotBeaconOffFlags, "beacon");
#endif #endif
#endif // USE_BEEPER
cliPrintHashLine("map"); cliPrintHashLine("map");
printMap(dumpMask, &rxConfig_Copy, rxConfig()); printMap(dumpMask, &rxConfig_Copy, rxConfig());
@ -4181,14 +4181,14 @@ static void cliHelp(char *cmdline);
const clicmd_t cmdTable[] = { const clicmd_t cmdTable[] = {
CLI_COMMAND_DEF("adjrange", "configure adjustment ranges", NULL, cliAdjustmentRange), CLI_COMMAND_DEF("adjrange", "configure adjustment ranges", NULL, cliAdjustmentRange),
CLI_COMMAND_DEF("aux", "configure modes", "<index> <mode> <aux> <start> <end> <logic>", cliAux), CLI_COMMAND_DEF("aux", "configure modes", "<index> <mode> <aux> <start> <end> <logic>", cliAux),
#ifdef USE_DSHOT #if defined(USE_BEEPER)
#if defined(USE_DSHOT)
CLI_COMMAND_DEF("beacon", "turn on/off beeper", "list\r\n" CLI_COMMAND_DEF("beacon", "turn on/off beeper", "list\r\n"
"\t<+|->[name]", cliBeacon), "\t<+|->[name]", cliBeacon),
#endif #endif
#ifdef USE_BEEPER
CLI_COMMAND_DEF("beeper", "turn on/off beeper", "list\r\n" CLI_COMMAND_DEF("beeper", "turn on/off beeper", "list\r\n"
"\t<+|->[name]", cliBeeper), "\t<+|->[name]", cliBeeper),
#endif #endif // USE_BEEPER
CLI_COMMAND_DEF("bl", "reboot into bootloader", NULL, cliBootloader), CLI_COMMAND_DEF("bl", "reboot into bootloader", NULL, cliBootloader),
#ifdef USE_LED_STRIP #ifdef USE_LED_STRIP
CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor), CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor),

View file

@ -247,10 +247,14 @@ void init(void)
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
LED1_TOGGLE; LED1_TOGGLE;
LED0_TOGGLE; LED0_TOGGLE;
#if defined(USE_BEEPER)
delay(25); delay(25);
if (!(getBeeperOffMask() & (1 << (BEEPER_SYSTEM_INIT - 1)))) BEEP_ON; if (!(beeperConfig()->beeper_off_flags & BEEPER_GET_FLAG(BEEPER_SYSTEM_INIT))) BEEP_ON;
delay(25); delay(25);
BEEP_OFF; BEEP_OFF;
#else
delay(50);
#endif
} }
LED0_OFF; LED0_OFF;
LED1_OFF; LED1_OFF;