mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Convert to USE_ scheme
This commit is contained in:
parent
177472b4fc
commit
ea0db878bf
104 changed files with 217 additions and 131 deletions
|
@ -2057,7 +2057,7 @@ static void cliFeature(char *cmdline)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef BEEPER
|
||||
#ifdef USE_BEEPER
|
||||
static void printBeeper(uint8_t dumpMask, const beeperConfig_t *beeperConfig, const beeperConfig_t *beeperConfigDefault)
|
||||
{
|
||||
const uint8_t beeperCount = beeperTableEntryCount();
|
||||
|
@ -3162,7 +3162,7 @@ typedef struct {
|
|||
} cliResourceValue_t;
|
||||
|
||||
const cliResourceValue_t resourceTable[] = {
|
||||
#ifdef BEEPER
|
||||
#ifdef USE_BEEPER
|
||||
{ OWNER_BEEPER, PG_BEEPER_DEV_CONFIG, offsetof(beeperDevConfig_t, ioTag), 0 },
|
||||
#endif
|
||||
{ OWNER_MOTOR, PG_MOTOR_CONFIG, offsetof(motorConfig_t, dev.ioTags[0]), MAX_SUPPORTED_MOTORS },
|
||||
|
@ -3557,7 +3557,7 @@ static void printConfig(char *cmdline, bool doDiff)
|
|||
cliPrintHashLine("feature");
|
||||
printFeature(dumpMask, &featureConfig_Copy, featureConfig());
|
||||
|
||||
#ifdef BEEPER
|
||||
#ifdef USE_BEEPER
|
||||
cliPrintHashLine("beeper");
|
||||
printBeeper(dumpMask, &beeperConfig_Copy, beeperConfig());
|
||||
#endif
|
||||
|
@ -3677,7 +3677,7 @@ static void cliHelp(char *cmdline);
|
|||
const clicmd_t cmdTable[] = {
|
||||
CLI_COMMAND_DEF("adjrange", "configure adjustment ranges", NULL, cliAdjustmentRange),
|
||||
CLI_COMMAND_DEF("aux", "configure modes", "<index> <mode> <aux> <start> <end> <logic>", cliAux),
|
||||
#ifdef BEEPER
|
||||
#ifdef USE_BEEPER
|
||||
CLI_COMMAND_DEF("beeper", "turn on/off beeper", "list\r\n"
|
||||
"\t<+|->[name]", cliBeeper),
|
||||
#endif
|
||||
|
|
|
@ -471,7 +471,7 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce
|
|||
sbufWriteU32(dst, featureMask());
|
||||
break;
|
||||
|
||||
#ifdef BEEPER
|
||||
#ifdef USE_BEEPER
|
||||
case MSP_BEEPER_CONFIG:
|
||||
sbufWriteU32(dst, getBeeperOffMask());
|
||||
sbufWriteU8(dst, beeperConfig()->dshotBeaconTone);
|
||||
|
@ -1846,7 +1846,7 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
|
|||
featureSet(sbufReadU32(src)); // features bitmap
|
||||
break;
|
||||
|
||||
#ifdef BEEPER
|
||||
#ifdef USE_BEEPER
|
||||
case MSP_SET_BEEPER_CONFIG:
|
||||
beeperOffClearAll();
|
||||
setBeeperOffMask(sbufReadU32(src));
|
||||
|
|
|
@ -524,7 +524,7 @@ const clivalue_t valueTable[] = {
|
|||
{ "ibatv_offset", VAR_INT16 | MASTER_VALUE, .config.minmax = { -16000, 16000 }, PG_CURRENT_SENSOR_VIRTUAL_CONFIG, offsetof(currentSensorVirtualConfig_t, offset) },
|
||||
#endif
|
||||
|
||||
#ifdef BEEPER
|
||||
#ifdef USE_BEEPER
|
||||
// PG_BEEPER_DEV_CONFIG
|
||||
{ "beeper_inversion", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_BEEPER_DEV_CONFIG, offsetof(beeperDevConfig_t, isInverted) },
|
||||
{ "beeper_od", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_BEEPER_DEV_CONFIG, offsetof(beeperDevConfig_t, isOpenDrain) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue