From f307bf3134c762350e4f6727feb1f890cd5f0d51 Mon Sep 17 00:00:00 2001 From: mikeller Date: Thu, 31 May 2018 19:43:46 +1200 Subject: [PATCH] Fixed build for exotic targets. --- src/main/interface/cli.c | 12 ++++++------ src/main/osd_slave/osd_slave_init.c | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/interface/cli.c b/src/main/interface/cli.c index ee05a1bbbc..78eb80c2df 100644 --- a/src/main/interface/cli.c +++ b/src/main/interface/cli.c @@ -4018,15 +4018,15 @@ static void printConfig(char *cmdline, bool doDiff) cliPrintHashLine("feature"); printFeature(dumpMask, &featureConfig_Copy, featureConfig()); -#ifdef USE_BEEPER +#if defined(USE_BEEPER) cliPrintHashLine("beeper"); printBeeper(dumpMask, beeperConfig_Copy.beeper_off_flags, beeperConfig()->beeper_off_flags, "beeper"); -#endif -#ifdef USE_DSHOT +#if defined(USE_DSHOT) cliPrintHashLine("beacon"); printBeeper(dumpMask, beeperConfig_Copy.dshotBeaconOffFlags, beeperConfig()->dshotBeaconOffFlags, "beacon"); #endif +#endif // USE_BEEPER cliPrintHashLine("map"); printMap(dumpMask, &rxConfig_Copy, rxConfig()); @@ -4181,14 +4181,14 @@ static void cliHelp(char *cmdline); const clicmd_t cmdTable[] = { CLI_COMMAND_DEF("adjrange", "configure adjustment ranges", NULL, cliAdjustmentRange), CLI_COMMAND_DEF("aux", "configure modes", " ", cliAux), -#ifdef USE_DSHOT +#if defined(USE_BEEPER) +#if defined(USE_DSHOT) CLI_COMMAND_DEF("beacon", "turn on/off beeper", "list\r\n" "\t<+|->[name]", cliBeacon), #endif -#ifdef USE_BEEPER CLI_COMMAND_DEF("beeper", "turn on/off beeper", "list\r\n" "\t<+|->[name]", cliBeeper), -#endif +#endif // USE_BEEPER CLI_COMMAND_DEF("bl", "reboot into bootloader", NULL, cliBootloader), #ifdef USE_LED_STRIP CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor), diff --git a/src/main/osd_slave/osd_slave_init.c b/src/main/osd_slave/osd_slave_init.c index 3c44c7cb05..3c061a99d2 100644 --- a/src/main/osd_slave/osd_slave_init.c +++ b/src/main/osd_slave/osd_slave_init.c @@ -247,10 +247,14 @@ void init(void) for (int i = 0; i < 10; i++) { LED1_TOGGLE; LED0_TOGGLE; +#if defined(USE_BEEPER) 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); BEEP_OFF; +#else + delay(50); +#endif } LED0_OFF; LED1_OFF;