From b78d8ad83e5b5239f214b07e3a33b566a74f66e2 Mon Sep 17 00:00:00 2001 From: mikeller Date: Mon, 6 Nov 2017 23:28:43 +1300 Subject: [PATCH] Converted more 'feature' type defines to use the 'USE_' convention: LED_STRIP TARGET_CONFIG BRUSHED_ESC_AUTODETECT SERIAL_RX TELEMETRY TELEMETRY_CRSF TELEMETRY_FRSKY TELEMETRY_HOTT TELEMETRY_IBUS TELEMETRY_JETIEXBUS TELEMETRY_LTM TELEMETRY_MAVLINK TELEMETRY_SMARTPORT TELEMETRY_SRXL TELEMETRY_NRF24_LTM TELEMETRY_LTM SPEKTRUM_BIND NAV BUTTONS --- src/main/cms/cms_menu_builtin.c | 2 +- src/main/cms/cms_menu_ledstrip.c | 2 +- src/main/drivers/buttons.c | 2 +- src/main/drivers/light_ws2811strip.c | 2 +- src/main/drivers/light_ws2811strip_hal.c | 2 +- .../drivers/light_ws2811strip_stdperiph.c | 2 +- src/main/drivers/pwm_esc_detect.c | 2 +- src/main/drivers/pwm_esc_detect.h | 2 +- src/main/drivers/timer.h | 2 +- src/main/drivers/timer_def.h | 2 +- src/main/fc/cli.c | 14 ++--- src/main/fc/config.c | 10 ++-- src/main/fc/fc_core.c | 2 +- src/main/fc/fc_init.c | 8 +-- src/main/fc/fc_msp.c | 4 +- src/main/fc/fc_msp_box.c | 4 +- src/main/fc/fc_tasks.c | 10 ++-- src/main/fc/settings.c | 14 ++--- src/main/fc/settings.h | 2 +- src/main/flight/mixer.c | 2 +- src/main/io/ledstrip.c | 2 +- src/main/io/serial.c | 6 +- src/main/osd_slave/osd_slave_init.c | 2 +- src/main/rx/crsf.c | 2 +- src/main/rx/frsky_d.c | 8 +-- src/main/rx/ibus.c | 10 ++-- src/main/rx/jetiexbus.c | 2 +- src/main/rx/nrf24_inav.c | 2 +- src/main/rx/rx.c | 4 +- src/main/rx/sbus.c | 8 +-- src/main/rx/spektrum.c | 12 ++-- src/main/rx/sumd.c | 8 +-- src/main/rx/sumh.c | 8 +-- src/main/rx/xbus.c | 8 +-- src/main/scheduler/scheduler.h | 4 +- src/main/target/ALIENFLIGHTF1/config.c | 2 +- src/main/target/ALIENFLIGHTF1/target.h | 4 +- src/main/target/ALIENFLIGHTF3/config.c | 2 +- src/main/target/ALIENFLIGHTF3/target.h | 6 +- src/main/target/ALIENFLIGHTF4/config.c | 2 +- src/main/target/ALIENFLIGHTF4/target.h | 6 +- src/main/target/ALIENFLIGHTNGF7/config.c | 2 +- src/main/target/ALIENFLIGHTNGF7/target.h | 6 +- src/main/target/ALIENWHOOP/config.c | 2 +- src/main/target/ALIENWHOOP/target.h | 8 +-- src/main/target/BEEBRAIN_V2F/config.c | 2 +- src/main/target/BEEBRAIN_V2F/target.h | 4 +- src/main/target/BEEROTORF4/target.h | 2 +- src/main/target/BETAFLIGHTF4/target.h | 4 +- src/main/target/BLUEJAYF4/config.c | 2 +- src/main/target/BLUEJAYF4/target.h | 2 +- src/main/target/CC3D/target.h | 4 +- src/main/target/CHEBUZZF3/target.h | 2 +- src/main/target/CJMCU/target.h | 10 ++-- src/main/target/CLRACINGF7/target.h | 2 +- src/main/target/COLIBRI/config.c | 2 +- src/main/target/COLIBRI/target.h | 2 +- src/main/target/COLIBRI_RACE/i2c_bst.c | 4 +- src/main/target/EACHIF3/target.h | 2 +- src/main/target/ELLE0/target.h | 2 +- src/main/target/F4BY/target.h | 2 +- src/main/target/FF_FORTINIF4/config.c | 2 +- src/main/target/FF_FORTINIF4/target.h | 4 +- src/main/target/FF_PIKOBLX/config.c | 2 +- src/main/target/FF_PIKOBLX/target.h | 4 +- src/main/target/FF_PIKOF4/config.c | 2 +- src/main/target/FF_PIKOF4/target.h | 4 +- src/main/target/FRSKYF3/config.c | 2 +- src/main/target/FRSKYF3/target.h | 4 +- src/main/target/FRSKYF4/config.c | 2 +- src/main/target/FRSKYF4/target.h | 2 +- src/main/target/FURYF7/target.h | 2 +- src/main/target/IRCFUSIONF3/target.h | 2 +- src/main/target/KAKUTEF4/config.c | 2 +- src/main/target/KAKUTEF4/target.h | 2 +- src/main/target/KAKUTEF7/target.h | 4 +- src/main/target/KISSFC/config.c | 2 +- src/main/target/KISSFC/target.h | 4 +- src/main/target/KIWIF4/target.h | 2 +- src/main/target/KROOZX/config.c | 2 +- src/main/target/KROOZX/target.h | 4 +- src/main/target/LUMBAF3/target.h | 2 +- src/main/target/MATEKF405/target.h | 2 +- src/main/target/MATEKF722/target.h | 4 +- src/main/target/MOTOLAB/config.c | 2 +- src/main/target/MOTOLAB/target.h | 2 +- src/main/target/MOTOLABF4/config.c | 2 +- src/main/target/MOTOLABF4/target.h | 6 +- src/main/target/MULTIFLITEPICO/config.c | 2 +- src/main/target/MULTIFLITEPICO/target.h | 2 +- src/main/target/NAZE/config.c | 2 +- src/main/target/NAZE/target.h | 6 +- src/main/target/OMNIBUS/target.h | 10 ++-- src/main/target/OMNIBUSF4/config.c | 2 +- src/main/target/OMNIBUSF4/target.h | 2 +- src/main/target/OMNIBUSF7/config.c | 2 +- src/main/target/OMNIBUSF7/target.h | 4 +- src/main/target/RACEBASE/config.c | 2 +- src/main/target/RACEBASE/target.h | 2 +- src/main/target/RCEXPLORERF3/target.h | 5 +- src/main/target/REVONANO/target.h | 2 +- src/main/target/RG_SSD_F3/config.c | 2 +- src/main/target/RG_SSD_F3/target.h | 2 +- src/main/target/SITL/target.h | 22 +++---- src/main/target/SPARKY2/target.h | 2 +- src/main/target/SPRACINGF3EVO/config.c | 2 +- src/main/target/SPRACINGF3EVO/target.h | 9 ++- src/main/target/SPRACINGF3MINI/target.h | 4 +- src/main/target/SPRACINGF3NEO/config.c | 2 +- src/main/target/SPRACINGF3NEO/target.h | 4 +- src/main/target/SPRACINGF3OSD/config.c | 2 +- src/main/target/SPRACINGF3OSD/target.h | 2 +- src/main/target/SPRACINGF4EVO/config.c | 2 +- src/main/target/SPRACINGF4EVO/target.h | 6 +- src/main/target/SPRACINGF4NEO/config.c | 2 +- src/main/target/SPRACINGF4NEO/target.h | 8 +-- src/main/target/STM32F3DISCOVERY/target.h | 2 +- src/main/target/TINYFISH/config.c | 2 +- src/main/target/TINYFISH/target.h | 2 +- src/main/target/VRRACE/target.h | 2 +- src/main/target/YUPIF4/config.c | 2 +- src/main/target/YUPIF4/target.h | 2 +- src/main/target/YUPIF7/config.c | 2 +- src/main/target/YUPIF7/target.h | 4 +- src/main/target/common_fc_post.h | 2 +- src/main/target/common_fc_pre.h | 28 ++++----- src/main/telemetry/crsf.c | 2 +- src/main/telemetry/frsky.c | 2 +- src/main/telemetry/hott.c | 2 +- src/main/telemetry/ibus.c | 2 +- src/main/telemetry/ibus_shared.c | 2 +- src/main/telemetry/ibus_shared.h | 2 +- src/main/telemetry/jetiexbus.c | 4 +- src/main/telemetry/ltm.c | 2 +- src/main/telemetry/mavlink.c | 2 +- src/main/telemetry/smartport.c | 2 +- src/main/telemetry/srxl.c | 2 +- src/main/telemetry/telemetry.c | 58 +++++++++---------- src/test/unit/platform.h | 4 +- src/test/unit/target.h | 22 +++---- 140 files changed, 300 insertions(+), 308 deletions(-) diff --git a/src/main/cms/cms_menu_builtin.c b/src/main/cms/cms_menu_builtin.c index 5acc95e558..eaef303970 100644 --- a/src/main/cms/cms_menu_builtin.c +++ b/src/main/cms/cms_menu_builtin.c @@ -109,7 +109,7 @@ static OSD_Entry menuFeaturesEntries[] = {"VTX TR", OME_Submenu, cmsMenuChange, &cmsx_menuVtxTramp, 0}, #endif #endif // VTX_CONTROL -#ifdef LED_STRIP +#ifdef USE_LED_STRIP {"LED STRIP", OME_Submenu, cmsMenuChange, &cmsx_menuLedstrip, 0}, #endif // LED_STRIP {"BACK", OME_Back, NULL, NULL, 0}, diff --git a/src/main/cms/cms_menu_ledstrip.c b/src/main/cms/cms_menu_ledstrip.c index 05be01f962..e553c60a17 100644 --- a/src/main/cms/cms_menu_ledstrip.c +++ b/src/main/cms/cms_menu_ledstrip.c @@ -37,7 +37,7 @@ #include "fc/config.h" -#ifdef LED_STRIP +#ifdef USE_LED_STRIP static bool featureRead = false; static uint8_t cmsx_FeatureLedstrip; diff --git a/src/main/drivers/buttons.c b/src/main/drivers/buttons.c index 86a56944ea..1aa874eb40 100644 --- a/src/main/drivers/buttons.c +++ b/src/main/drivers/buttons.c @@ -25,7 +25,7 @@ #include "drivers/buttons.h" -#if defined(BUTTONS) +#if defined(USE_BUTTONS) #ifdef BUTTON_A_PIN static IO_t buttonAPin = IO_NONE; diff --git a/src/main/drivers/light_ws2811strip.c b/src/main/drivers/light_ws2811strip.c index cc9c6626cf..ddf64a6637 100644 --- a/src/main/drivers/light_ws2811strip.c +++ b/src/main/drivers/light_ws2811strip.c @@ -30,7 +30,7 @@ #include -#ifdef LED_STRIP +#ifdef USE_LED_STRIP #include "build/build_config.h" diff --git a/src/main/drivers/light_ws2811strip_hal.c b/src/main/drivers/light_ws2811strip_hal.c index 2c842dea06..75ac073944 100644 --- a/src/main/drivers/light_ws2811strip_hal.c +++ b/src/main/drivers/light_ws2811strip_hal.c @@ -20,7 +20,7 @@ #include "platform.h" -#ifdef LED_STRIP +#ifdef USE_LED_STRIP #include "common/color.h" #include "light_ws2811strip.h" diff --git a/src/main/drivers/light_ws2811strip_stdperiph.c b/src/main/drivers/light_ws2811strip_stdperiph.c index c623b0ad5e..6f92bd2b69 100644 --- a/src/main/drivers/light_ws2811strip_stdperiph.c +++ b/src/main/drivers/light_ws2811strip_stdperiph.c @@ -20,7 +20,7 @@ #include "platform.h" -#ifdef LED_STRIP +#ifdef USE_LED_STRIP #include "build/debug.h" diff --git a/src/main/drivers/pwm_esc_detect.c b/src/main/drivers/pwm_esc_detect.c index 2251c363ed..152cbad5ab 100644 --- a/src/main/drivers/pwm_esc_detect.c +++ b/src/main/drivers/pwm_esc_detect.c @@ -29,7 +29,7 @@ #include "pwm_esc_detect.h" #include "timer.h" -#ifdef BRUSHED_ESC_AUTODETECT +#ifdef USE_BRUSHED_ESC_AUTODETECT uint8_t hardwareMotorType = MOTOR_UNKNOWN; void detectBrushedESC(void) diff --git a/src/main/drivers/pwm_esc_detect.h b/src/main/drivers/pwm_esc_detect.h index b61dc0459a..803f8b7979 100644 --- a/src/main/drivers/pwm_esc_detect.h +++ b/src/main/drivers/pwm_esc_detect.h @@ -16,7 +16,7 @@ */ #pragma once -#ifdef BRUSHED_ESC_AUTODETECT +#ifdef USE_BRUSHED_ESC_AUTODETECT typedef enum { MOTOR_UNKNOWN = 0, MOTOR_BRUSHED, diff --git a/src/main/drivers/timer.h b/src/main/drivers/timer.h index 7476eb0ac3..7cd6f0dc36 100644 --- a/src/main/drivers/timer.h +++ b/src/main/drivers/timer.h @@ -96,7 +96,7 @@ typedef struct timerHardware_s { #if defined(STM32F3) || defined(STM32F4) || defined(STM32F7) uint8_t alternateFunction; #endif -#if defined(USE_DSHOT) || defined(LED_STRIP) || defined(TRANSPONDER) +#if defined(USE_DSHOT) || defined(USE_LED_STRIP) || defined(TRANSPONDER) #if defined(STM32F4) || defined(STM32F7) DMA_Stream_TypeDef *dmaRef; uint32_t dmaChannel; diff --git a/src/main/drivers/timer_def.h b/src/main/drivers/timer_def.h index b3ed6c1172..c07590b6c3 100644 --- a/src/main/drivers/timer_def.h +++ b/src/main/drivers/timer_def.h @@ -22,7 +22,7 @@ #include "common/utils.h" // allow conditional definition of DMA related members -#if defined(USE_DSHOT) || defined(LED_STRIP) || defined(TRANSPONDER) +#if defined(USE_DSHOT) || defined(USE_LED_STRIP) || defined(TRANSPONDER) # define DEF_TIM_DMA_COND(...) __VA_ARGS__ #else # define DEF_TIM_DMA_COND(...) diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index 620eb767f6..440545066b 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -1226,7 +1226,7 @@ static void cliRxRange(char *cmdline) } } -#ifdef LED_STRIP +#ifdef USE_LED_STRIP static void printLed(uint8_t dumpMask, const ledConfig_t *ledConfigs, const ledConfig_t *defaultLedConfigs) { const char *format = "led %u %s"; @@ -3135,7 +3135,7 @@ const cliResourceValue_t resourceTable[] = { { OWNER_SONAR_TRIGGER, PG_SONAR_CONFIG, offsetof(sonarConfig_t, triggerTag), 0 }, { OWNER_SONAR_ECHO, PG_SONAR_CONFIG, offsetof(sonarConfig_t, echoTag), 0 }, #endif -#ifdef LED_STRIP +#ifdef USE_LED_STRIP { OWNER_LED_STRIP, PG_LED_STRIP_CONFIG, offsetof(ledStripConfig_t, ioTag), 0 }, #endif { OWNER_SERIAL_TX, PG_SERIAL_PIN_CONFIG, offsetof(serialPinConfig_t, ioTagTx[0]), SERIAL_PORT_MAX_INDEX }, @@ -3440,7 +3440,7 @@ static void printConfig(char *cmdline, bool doDiff) // reset all configs to defaults to do differencing resetConfigs(); -#if defined(TARGET_CONFIG) +#if defined(USE_TARGET_CONFIG) targetConfiguration(); #endif if (checkCommand(options, "defaults")) { @@ -3501,7 +3501,7 @@ static void printConfig(char *cmdline, bool doDiff) cliPrintHashLine("serial"); printSerial(dumpMask, &serialConfig_Copy, serialConfig()); -#ifdef LED_STRIP +#ifdef USE_LED_STRIP cliPrintHashLine("led"); printLed(dumpMask, ledStripConfig_Copy.ledConfigs, ledStripConfig()->ledConfigs); @@ -3615,7 +3615,7 @@ const clicmd_t cmdTable[] = { "\t<+|->[name]", cliBeeper), #endif CLI_COMMAND_DEF("bl", "reboot into bootloader", NULL, cliBootloader), -#ifdef LED_STRIP +#ifdef USE_LED_STRIP CLI_COMMAND_DEF("color", "configure colors", NULL, cliColor), #endif CLI_COMMAND_DEF("defaults", "reset to defaults and reboot", "[nosave]", cliDefaults), @@ -3649,7 +3649,7 @@ const clicmd_t cmdTable[] = { CLI_COMMAND_DEF("gpspassthrough", "passthrough gps to serial", NULL, cliGpsPassthrough), #endif CLI_COMMAND_DEF("help", NULL, NULL, cliHelp), -#ifdef LED_STRIP +#ifdef USE_LED_STRIP CLI_COMMAND_DEF("led", "configure leds", NULL, cliLed), #endif CLI_COMMAND_DEF("map", "configure rc channel order", "[]", cliMap), @@ -3657,7 +3657,7 @@ const clicmd_t cmdTable[] = { CLI_COMMAND_DEF("mixer", "configure mixer", "list\r\n\t", cliMixer), #endif CLI_COMMAND_DEF("mmix", "custom motor mixer", NULL, cliMotorMix), -#ifdef LED_STRIP +#ifdef USE_LED_STRIP CLI_COMMAND_DEF("mode_color", "configure mode and special colors", NULL, cliModeColor), #endif CLI_COMMAND_DEF("motor", "get/set motor", " []", cliMotor), diff --git a/src/main/fc/config.c b/src/main/fc/config.c index 1470ee8120..3f6716817a 100755 --- a/src/main/fc/config.c +++ b/src/main/fc/config.c @@ -285,7 +285,7 @@ void resetConfigs(void) { pgResetAll(); -#if defined(TARGET_CONFIG) +#if defined(USE_TARGET_CONFIG) targetConfiguration(); #endif @@ -294,7 +294,7 @@ void resetConfigs(void) setControlRateProfile(0); #endif -#ifdef LED_STRIP +#ifdef USE_LED_STRIP reevaluateLedConfig(); #endif } @@ -432,7 +432,7 @@ static void validateAndFixConfig(void) featureClear(FEATURE_RX_PPM); #endif -#ifndef SERIAL_RX +#ifndef USE_SERIAL_RX featureClear(FEATURE_RX_SERIAL); #endif @@ -448,7 +448,7 @@ static void validateAndFixConfig(void) featureClear(FEATURE_SONAR); #endif -#ifndef TELEMETRY +#ifndef USE_TELEMETRY featureClear(FEATURE_TELEMETRY); #endif @@ -460,7 +460,7 @@ static void validateAndFixConfig(void) featureClear(FEATURE_RX_MSP); #endif -#ifndef LED_STRIP +#ifndef USE_LED_STRIP featureClear(FEATURE_LED_STRIP); #endif diff --git a/src/main/fc/fc_core.c b/src/main/fc/fc_core.c index fbb8a4b9fc..932db2abfb 100644 --- a/src/main/fc/fc_core.c +++ b/src/main/fc/fc_core.c @@ -552,7 +552,7 @@ void processRx(timeUs_t currentTimeUs) DISABLE_FLIGHT_MODE(HEADFREE_MODE); } -#ifdef TELEMETRY +#ifdef USE_TELEMETRY if (feature(FEATURE_TELEMETRY)) { if ((!telemetryConfig()->telemetry_switch && ARMING_FLAG(ARMED)) || (telemetryConfig()->telemetry_switch && IS_RC_MODE_ACTIVE(BOXTELEMETRY))) { diff --git a/src/main/fc/fc_init.c b/src/main/fc/fc_init.c index 1a8976742d..01df966979 100644 --- a/src/main/fc/fc_init.c +++ b/src/main/fc/fc_init.c @@ -260,7 +260,7 @@ void init(void) detectHardwareRevision(); #endif -#ifdef BRUSHED_ESC_AUTODETECT +#ifdef USE_BRUSHED_ESC_AUTODETECT detectBrushedESC(); #endif @@ -296,7 +296,7 @@ void init(void) EXTIInit(); #endif -#if defined(BUTTONS) +#if defined(USE_BUTTONS) buttonsInit(); @@ -603,7 +603,7 @@ void init(void) } #endif -#ifdef LED_STRIP +#ifdef USE_LED_STRIP ledStripInit(); if (feature(FEATURE_LED_STRIP)) { @@ -611,7 +611,7 @@ void init(void) } #endif -#ifdef TELEMETRY +#ifdef USE_TELEMETRY if (feature(FEATURE_TELEMETRY)) { telemetryInit(); } diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index c8315d48c0..421f5a23a5 100644 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -1061,7 +1061,7 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst) } break; -#ifdef LED_STRIP +#ifdef USE_LED_STRIP case MSP_LED_COLORS: for (int i = 0; i < LED_CONFIGURABLE_COLOR_COUNT; i++) { const hsvColor_t *color = &ledStripConfig()->colors[i]; @@ -1917,7 +1917,7 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src) } break; -#ifdef LED_STRIP +#ifdef USE_LED_STRIP case MSP_SET_LED_COLORS: for (int i = 0; i < LED_CONFIGURABLE_COLOR_COUNT; i++) { hsvColor_t *color = &ledStripConfigMutable()->colors[i]; diff --git a/src/main/fc/fc_msp_box.c b/src/main/fc/fc_msp_box.c index b1da9954e6..9329329b2e 100644 --- a/src/main/fc/fc_msp_box.c +++ b/src/main/fc/fc_msp_box.c @@ -201,7 +201,7 @@ void initActiveBoxIds(void) BME(BOXBEEPERON); -#ifdef LED_STRIP +#ifdef USE_LED_STRIP if (feature(FEATURE_LED_STRIP)) { BME(BOXLEDLOW); } @@ -235,7 +235,7 @@ void initActiveBoxIds(void) BME(BOXOSD); -#ifdef TELEMETRY +#ifdef USE_TELEMETRY if (feature(FEATURE_TELEMETRY) && telemetryConfig()->telemetry_switch) { BME(BOXTELEMETRY); } diff --git a/src/main/fc/fc_tasks.c b/src/main/fc/fc_tasks.c index 3fd0ad6181..44bfda7ce6 100644 --- a/src/main/fc/fc_tasks.c +++ b/src/main/fc/fc_tasks.c @@ -196,7 +196,7 @@ static void taskCalculateAltitude(timeUs_t currentTimeUs) }} #endif -#ifdef TELEMETRY +#ifdef USE_TELEMETRY static void taskTelemetry(timeUs_t currentTimeUs) { telemetryCheckState(); @@ -299,7 +299,7 @@ void fcTasksInit(void) #ifdef USE_DASHBOARD setTaskEnabled(TASK_DASHBOARD, feature(FEATURE_DASHBOARD)); #endif -#ifdef TELEMETRY +#ifdef USE_TELEMETRY setTaskEnabled(TASK_TELEMETRY, feature(FEATURE_TELEMETRY)); if (feature(FEATURE_TELEMETRY)) { if (rxConfig()->serialrx_provider == SERIALRX_JETIEXBUS) { @@ -311,7 +311,7 @@ void fcTasksInit(void) } } #endif -#ifdef LED_STRIP +#ifdef USE_LED_STRIP setTaskEnabled(TASK_LEDSTRIP, feature(FEATURE_LED_STRIP)); #endif #ifdef TRANSPONDER @@ -526,7 +526,7 @@ cfTask_t cfTasks[TASK_COUNT] = { }, #endif -#ifdef TELEMETRY +#ifdef USE_TELEMETRY [TASK_TELEMETRY] = { .taskName = "TELEMETRY", .taskFunc = taskTelemetry, @@ -535,7 +535,7 @@ cfTask_t cfTasks[TASK_COUNT] = { }, #endif -#ifdef LED_STRIP +#ifdef USE_LED_STRIP [TASK_LEDSTRIP] = { .taskName = "LEDSTRIP", .taskFunc = ledStripUpdate, diff --git a/src/main/fc/settings.c b/src/main/fc/settings.c index 2cc067f8dd..21733dbcab 100644 --- a/src/main/fc/settings.c +++ b/src/main/fc/settings.c @@ -168,7 +168,7 @@ static const char * const lookupTableBlackboxMode[] = { }; #endif -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX static const char * const lookupTableSerialRX[] = { "SPEK1024", "SPEK2048", @@ -282,7 +282,7 @@ const lookupTableEntry_t lookupTables[] = { #ifdef USE_SERVOS { lookupTableGimbalMode, sizeof(lookupTableGimbalMode) / sizeof(char *) }, #endif -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX { lookupTableSerialRX, sizeof(lookupTableSerialRX) / sizeof(char *) }, #endif #ifdef USE_RX_SPI @@ -390,7 +390,7 @@ const clivalue_t valueTable[] = { { "rc_interp_int", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 1, 50 }, PG_RX_CONFIG, offsetof(rxConfig_t, rcInterpolationInterval) }, { "fpv_mix_degrees", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 50 }, PG_RX_CONFIG, offsetof(rxConfig_t, fpvCamAngleDegrees) }, { "max_aux_channels", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, MAX_AUX_CHANNEL_COUNT }, PG_RX_CONFIG, offsetof(rxConfig_t, max_aux_channel) }, -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX { "serialrx_provider", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_SERIAL_RX }, PG_RX_CONFIG, offsetof(rxConfig_t, serialrx_provider) }, { "serialrx_inverted", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_RX_CONFIG, offsetof(rxConfig_t, serialrx_inverted) }, #endif @@ -641,11 +641,11 @@ const clivalue_t valueTable[] = { #endif // PG_TELEMETRY_CONFIG -#ifdef TELEMETRY +#ifdef USE_TELEMETRY { "tlm_switch", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, telemetry_switch) }, { "tlm_inverted", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, telemetry_inverted) }, { "tlm_halfduplex", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, halfDuplex) }, -#if defined(TELEMETRY_FRSKY) +#if defined(USE_TELEMETRY_FRSKY) #if defined(USE_GPS) { "frsky_default_lat", VAR_INT16 | MASTER_VALUE, .config.minmax = { -9000, 9000 }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, gpsNoFixLatitude) }, { "frsky_default_long", VAR_INT16 | MASTER_VALUE, .config.minmax = { -18000, 18000 }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, gpsNoFixLongitude) }, @@ -656,13 +656,13 @@ const clivalue_t valueTable[] = { #endif { "hott_alarm_int", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 120 }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, hottAlarmSoundInterval) }, { "pid_in_tlm", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = {TABLE_OFF_ON }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, pidValuesAsTelemetry) }, -#if defined(TELEMETRY_IBUS) +#if defined(USE_TELEMETRY_IBUS) { "report_cell_voltage", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_TELEMETRY_CONFIG, offsetof(telemetryConfig_t, report_cell_voltage) }, #endif #endif // PG_LED_STRIP_CONFIG -#ifdef LED_STRIP +#ifdef USE_LED_STRIP { "ledstrip_visual_beeper", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_LED_STRIP_CONFIG, offsetof(ledStripConfig_t, ledstrip_visual_beeper) }, #endif diff --git a/src/main/fc/settings.h b/src/main/fc/settings.h index bb728f9dd5..ed35ce95ff 100644 --- a/src/main/fc/settings.h +++ b/src/main/fc/settings.h @@ -39,7 +39,7 @@ typedef enum { #ifdef USE_SERVOS TABLE_GIMBAL_MODE, #endif -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX TABLE_SERIAL_RX, #endif #ifdef USE_RX_SPI diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index 3a3246eefd..a80fca4c1f 100755 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -75,7 +75,7 @@ void pgResetFn_motorConfig(motorConfig_t *motorConfig) motorConfig->dev.motorPwmProtocol = PWM_TYPE_BRUSHED; motorConfig->dev.useUnsyncedPwm = true; #else -#ifdef BRUSHED_ESC_AUTODETECT +#ifdef USE_BRUSHED_ESC_AUTODETECT if (hardwareMotorType == MOTOR_BRUSHED) { motorConfig->minthrottle = 1000; motorConfig->dev.motorPwmRate = BRUSHED_MOTORS_PWM_RATE; diff --git a/src/main/io/ledstrip.c b/src/main/io/ledstrip.c index 4d543921cb..51cbfea728 100644 --- a/src/main/io/ledstrip.c +++ b/src/main/io/ledstrip.c @@ -23,7 +23,7 @@ #include -#ifdef LED_STRIP +#ifdef USE_LED_STRIP #include "build/build_config.h" diff --git a/src/main/io/serial.c b/src/main/io/serial.c index 64d3e26e1e..0e0ac62876 100644 --- a/src/main/io/serial.c +++ b/src/main/io/serial.c @@ -54,7 +54,7 @@ #include "msp/msp_serial.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "telemetry/telemetry.h" #endif @@ -258,7 +258,7 @@ serialPort_t *findNextSharedSerialPort(uint16_t functionMask, serialPortFunction return NULL; } -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #define ALL_FUNCTIONS_SHARABLE_WITH_MSP (FUNCTION_BLACKBOX | TELEMETRY_PORT_FUNCTIONS_MASK) #else #define ALL_FUNCTIONS_SHARABLE_WITH_MSP (FUNCTION_BLACKBOX) @@ -294,7 +294,7 @@ bool isSerialConfigValid(const serialConfig_t *serialConfigToCheck) if ((portConfig->functionMask & FUNCTION_MSP) && (portConfig->functionMask & ALL_FUNCTIONS_SHARABLE_WITH_MSP)) { // MSP & telemetry -#ifdef TELEMETRY +#ifdef USE_TELEMETRY } else if (telemetryCheckRxPortShared(portConfig)) { // serial RX & telemetry #endif diff --git a/src/main/osd_slave/osd_slave_init.c b/src/main/osd_slave/osd_slave_init.c index a5abd5268a..a7e6644f7b 100644 --- a/src/main/osd_slave/osd_slave_init.c +++ b/src/main/osd_slave/osd_slave_init.c @@ -260,7 +260,7 @@ void init(void) osdSlaveInit(osdDisplayPort); #endif -#ifdef LED_STRIP +#ifdef USE_LED_STRIP ledStripInit(); if (feature(FEATURE_LED_STRIP)) { diff --git a/src/main/rx/crsf.c b/src/main/rx/crsf.c index 63e760aed9..f2df7aeb9e 100644 --- a/src/main/rx/crsf.c +++ b/src/main/rx/crsf.c @@ -22,7 +22,7 @@ #include "platform.h" -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX #include "build/build_config.h" #include "build/debug.h" diff --git a/src/main/rx/frsky_d.c b/src/main/rx/frsky_d.c index 4308440d61..af2585f659 100644 --- a/src/main/rx/frsky_d.c +++ b/src/main/rx/frsky_d.c @@ -88,7 +88,7 @@ static int16_t RSSI_dBm; static uint8_t telemetry_id; static uint32_t telemetryTime; -#if defined(TELEMETRY_FRSKY) +#if defined(USE_TELEMETRY_FRSKY) #define MAX_SERIAL_BYTES 64 static uint8_t hub_index; static uint8_t idxx = 0; @@ -136,7 +136,7 @@ static void compute_RSSIdbm(uint8_t *packet) processRssi(constrain((RSSI_dBm << 3) / 10, 0, 100)); } -#if defined(TELEMETRY_FRSKY) +#if defined(USE_TELEMETRY_FRSKY) static uint8_t frsky_append_hub_data(uint8_t *buf) { if (telemetry_id == telemetry_expected_id) @@ -183,7 +183,7 @@ static void telemetry_build_frame(uint8_t *packet) frame[3] = (uint8_t)((adcExternal1Sample & 0xff0) >> 4); // A1 frame[4] = (uint8_t)((adcRssiSample & 0xff0) >> 4); // A2 frame[5] = (uint8_t)RSSI_dBm; -#if defined(TELEMETRY_FRSKY) +#if defined(USE_TELEMETRY_FRSKY) bytes_used = frsky_append_hub_data(&frame[8]); #endif frame[6] = bytes_used; @@ -714,7 +714,7 @@ static void frskyD_Rx_Setup(rx_spi_protocol_e protocol) RX_enable(); #endif -#if defined(TELEMETRY_FRSKY) +#if defined(USE_TELEMETRY_FRSKY) initFrSkyExternalTelemetry(&frSkyTelemetryInitFrameSpi, &frSkyTelemetryWriteSpi); #endif diff --git a/src/main/rx/ibus.c b/src/main/rx/ibus.c index ff09673b83..ec2430af33 100755 --- a/src/main/rx/ibus.c +++ b/src/main/rx/ibus.c @@ -27,7 +27,7 @@ #include "platform.h" -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX #include "common/utils.h" @@ -37,7 +37,7 @@ #include "io/serial.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "telemetry/telemetry.h" #endif @@ -171,7 +171,7 @@ static uint8_t ibusFrameStatus(void) } else { -#if defined(TELEMETRY) && defined(TELEMETRY_IBUS) +#if defined(USE_TELEMETRY) && defined(USE_TELEMETRY_IBUS) rxBytesToIgnore = respondToIbusRequest(ibus); #endif } @@ -204,7 +204,7 @@ bool ibusInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) return false; } -#ifdef TELEMETRY +#ifdef USE_TELEMETRY // bool portShared = telemetryCheckRxPortShared(portConfig); bool portShared = isSerialPortShared(portConfig, FUNCTION_RX_SERIAL, FUNCTION_TELEMETRY_IBUS); #else @@ -221,7 +221,7 @@ bool ibusInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) (rxConfig->serialrx_inverted ? SERIAL_INVERTED : 0) | (rxConfig->halfDuplex || portShared ? SERIAL_BIDIR : 0) ); -#if defined(TELEMETRY) && defined(TELEMETRY_IBUS) +#if defined(USE_TELEMETRY) && defined(USE_TELEMETRY_IBUS) if (portShared) { initSharedIbusTelemetry(ibusPort); } diff --git a/src/main/rx/jetiexbus.c b/src/main/rx/jetiexbus.c index d9f86ca2ad..caa66f2738 100644 --- a/src/main/rx/jetiexbus.c +++ b/src/main/rx/jetiexbus.c @@ -39,7 +39,7 @@ #include "platform.h" -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX #include "build/build_config.h" #include "build/debug.h" diff --git a/src/main/rx/nrf24_inav.c b/src/main/rx/nrf24_inav.c index 3c791c4374..0bd9bb5776 100644 --- a/src/main/rx/nrf24_inav.c +++ b/src/main/rx/nrf24_inav.c @@ -276,7 +276,7 @@ static void writeAckPayload(const uint8_t *data, uint8_t length) static void writeTelemetryAckPayload(void) { -#ifdef TELEMETRY_NRF24_LTM +#ifdef USE_TELEMETRY_NRF24_LTM // set up telemetry data, send back telemetry data in the ACK packet static uint8_t sequenceNumber = 0; static ltm_frame_e ltmFrameType = LTM_FRAME_START; diff --git a/src/main/rx/rx.c b/src/main/rx/rx.c index 98fc39bdc9..4e53bb6868 100644 --- a/src/main/rx/rx.c +++ b/src/main/rx/rx.c @@ -223,7 +223,7 @@ STATIC_UNIT_TESTED void rxUpdateFlightChannelStatus(uint8_t channel, bool valid) } } -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX bool serialRxInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) { bool enabled = false; @@ -315,7 +315,7 @@ void rxInit(void) } } -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX if (feature(FEATURE_RX_SERIAL)) { const bool enabled = serialRxInit(rxConfig(), &rxRuntimeConfig); if (!enabled) { diff --git a/src/main/rx/sbus.c b/src/main/rx/sbus.c index 3fc8003407..ea0eb85758 100644 --- a/src/main/rx/sbus.c +++ b/src/main/rx/sbus.c @@ -21,7 +21,7 @@ #include "platform.h" -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX #include "common/utils.h" @@ -29,7 +29,7 @@ #include "io/serial.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "telemetry/telemetry.h" #endif #include "rx/rx.h" @@ -242,7 +242,7 @@ bool sbusInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) return false; } -#ifdef TELEMETRY +#ifdef USE_TELEMETRY bool portShared = telemetryCheckRxPortShared(portConfig); #else bool portShared = false; @@ -256,7 +256,7 @@ bool sbusInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) SBUS_PORT_OPTIONS | (rxConfig->serialrx_inverted ? 0 : SERIAL_INVERTED) | (rxConfig->halfDuplex ? SERIAL_BIDIR : 0) ); -#ifdef TELEMETRY +#ifdef USE_TELEMETRY if (portShared) { telemetrySharedPort = sBusPort; } diff --git a/src/main/rx/spektrum.c b/src/main/rx/spektrum.c index b80d7db91c..b7a51c9b60 100644 --- a/src/main/rx/spektrum.c +++ b/src/main/rx/spektrum.c @@ -22,7 +22,7 @@ #include "platform.h" #include "common/maths.h" -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX #include "build/debug.h" @@ -38,7 +38,7 @@ #include "fc/config.h" #include "fc/fc_dispatch.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "telemetry/telemetry.h" #endif @@ -527,7 +527,7 @@ void spektrumBind(rxConfig_t *rxConfig) // Take care half-duplex case switch (rxConfig->serialrx_provider) { case SERIALRX_SRXL: -#ifdef TELEMETRY +#ifdef USE_TELEMETRY if (feature(FEATURE_TELEMETRY) && !telemetryCheckRxPortShared(portConfig)) { bindPin = txPin; } @@ -602,7 +602,7 @@ bool spektrumInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig } srxlEnabled = false; -#ifdef TELEMETRY +#ifdef USE_TELEMETRY bool portShared = telemetryCheckRxPortShared(portConfig); #else bool portShared = false; @@ -610,7 +610,7 @@ bool spektrumInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig switch (rxConfig->serialrx_provider) { case SERIALRX_SRXL: -#ifdef TELEMETRY +#ifdef USE_TELEMETRY srxlEnabled = (feature(FEATURE_TELEMETRY) && !portShared); #endif case SERIALRX_SPEKTRUM2048: @@ -644,7 +644,7 @@ bool spektrumInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig (rxConfig->serialrx_inverted ? SERIAL_INVERTED : 0) | ((srxlEnabled || rxConfig->halfDuplex) ? SERIAL_BIDIR : 0) ); -#ifdef TELEMETRY +#ifdef USE_TELEMETRY if (portShared) { telemetrySharedPort = serialPort; } diff --git a/src/main/rx/sumd.c b/src/main/rx/sumd.c index 17273995a2..c096f95263 100644 --- a/src/main/rx/sumd.c +++ b/src/main/rx/sumd.c @@ -21,7 +21,7 @@ #include "platform.h" -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX #include "common/utils.h" @@ -29,7 +29,7 @@ #include "io/serial.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "telemetry/telemetry.h" #endif @@ -173,7 +173,7 @@ bool sumdInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) return false; } -#ifdef TELEMETRY +#ifdef USE_TELEMETRY bool portShared = telemetryCheckRxPortShared(portConfig); #else bool portShared = false; @@ -187,7 +187,7 @@ bool sumdInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) (rxConfig->serialrx_inverted ? SERIAL_INVERTED : 0) | (rxConfig->halfDuplex ? SERIAL_BIDIR : 0) ); -#ifdef TELEMETRY +#ifdef USE_TELEMETRY if (portShared) { telemetrySharedPort = sumdPort; } diff --git a/src/main/rx/sumh.c b/src/main/rx/sumh.c index 9655ef9365..53e058d742 100644 --- a/src/main/rx/sumh.c +++ b/src/main/rx/sumh.c @@ -27,7 +27,7 @@ #include "platform.h" -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX #include "common/utils.h" @@ -35,7 +35,7 @@ #include "io/serial.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "telemetry/telemetry.h" #endif @@ -127,7 +127,7 @@ bool sumhInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) return false; } -#ifdef TELEMETRY +#ifdef USE_TELEMETRY bool portShared = telemetryCheckRxPortShared(portConfig); #else bool portShared = false; @@ -135,7 +135,7 @@ bool sumhInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) sumhPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, sumhDataReceive, SUMH_BAUDRATE, portShared ? MODE_RXTX : MODE_RX, (rxConfig->serialrx_inverted ? SERIAL_INVERTED : 0)); -#ifdef TELEMETRY +#ifdef USE_TELEMETRY if (portShared) { telemetrySharedPort = sumhPort; } diff --git a/src/main/rx/xbus.c b/src/main/rx/xbus.c index 2ae2845e3e..ac9aa1794a 100644 --- a/src/main/rx/xbus.c +++ b/src/main/rx/xbus.c @@ -21,13 +21,13 @@ #include "platform.h" -#ifdef SERIAL_RX +#ifdef USE_SERIAL_RX #include "drivers/time.h" #include "io/serial.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "telemetry/telemetry.h" #endif @@ -323,7 +323,7 @@ bool xBusInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) return false; } -#ifdef TELEMETRY +#ifdef USE_TELEMETRY bool portShared = telemetryCheckRxPortShared(portConfig); #else bool portShared = false; @@ -337,7 +337,7 @@ bool xBusInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig) (rxConfig->serialrx_inverted ? SERIAL_INVERTED : 0) | (rxConfig->halfDuplex ? SERIAL_BIDIR : 0) ); -#ifdef TELEMETRY +#ifdef USE_TELEMETRY if (portShared) { telemetrySharedPort = xBusPort; } diff --git a/src/main/scheduler/scheduler.h b/src/main/scheduler/scheduler.h index e4d6d540d9..af37de3060 100644 --- a/src/main/scheduler/scheduler.h +++ b/src/main/scheduler/scheduler.h @@ -80,10 +80,10 @@ typedef enum { #ifdef USE_DASHBOARD TASK_DASHBOARD, #endif -#ifdef TELEMETRY +#ifdef USE_TELEMETRY TASK_TELEMETRY, #endif -#ifdef LED_STRIP +#ifdef USE_LED_STRIP TASK_LEDSTRIP, #endif #ifdef TRANSPONDER diff --git a/src/main/target/ALIENFLIGHTF1/config.c b/src/main/target/ALIENFLIGHTF1/config.c index f06309a309..f3993f416e 100644 --- a/src/main/target/ALIENFLIGHTF1/config.c +++ b/src/main/target/ALIENFLIGHTF1/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" diff --git a/src/main/target/ALIENFLIGHTF1/target.h b/src/main/target/ALIENFLIGHTF1/target.h index 98e47b0f77..0e680e4ce8 100644 --- a/src/main/target/ALIENFLIGHTF1/target.h +++ b/src/main/target/ALIENFLIGHTF1/target.h @@ -18,9 +18,9 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "AFF1" // AlienFlight F1. -#define TARGET_CONFIG +#define USE_TARGET_CONFIG -#define BRUSHED_ESC_AUTODETECT +#define USE_BRUSHED_ESC_AUTODETECT #define LED0_PIN PB3 #define LED1_PIN PB4 diff --git a/src/main/target/ALIENFLIGHTF3/config.c b/src/main/target/ALIENFLIGHTF3/config.c index 5e8ec5d752..a5f0a2632c 100644 --- a/src/main/target/ALIENFLIGHTF3/config.c +++ b/src/main/target/ALIENFLIGHTF3/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" diff --git a/src/main/target/ALIENFLIGHTF3/target.h b/src/main/target/ALIENFLIGHTF3/target.h index 3d01bee605..0f850996b5 100644 --- a/src/main/target/ALIENFLIGHTF3/target.h +++ b/src/main/target/ALIENFLIGHTF3/target.h @@ -18,14 +18,14 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "AFF3" // AlienFlight F3. -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define REMAP_TIM17_DMA #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT #define USE_HARDWARE_REVISION_DETECTION #define HW_PIN PB2 -#define BRUSHED_ESC_AUTODETECT +#define USE_BRUSHED_ESC_AUTODETECT // LED's V1 #define LED0_PIN PB4 @@ -113,7 +113,7 @@ #define VBAT_SCALE_DEFAULT 20 // LED strip configuration. -#define LED_STRIP +#define USE_LED_STRIP #define BINDPLUG_PIN PB12 diff --git a/src/main/target/ALIENFLIGHTF4/config.c b/src/main/target/ALIENFLIGHTF4/config.c index 565816e96a..b897aa6896 100644 --- a/src/main/target/ALIENFLIGHTF4/config.c +++ b/src/main/target/ALIENFLIGHTF4/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" diff --git a/src/main/target/ALIENFLIGHTF4/target.h b/src/main/target/ALIENFLIGHTF4/target.h index 57fde012c0..35d54535ba 100644 --- a/src/main/target/ALIENFLIGHTF4/target.h +++ b/src/main/target/ALIENFLIGHTF4/target.h @@ -17,11 +17,11 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "AFF4" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define USE_HARDWARE_REVISION_DETECTION #define HW_PIN PC13 -#define BRUSHED_ESC_AUTODETECT +#define USE_BRUSHED_ESC_AUTODETECT #define USBD_PRODUCT_STRING "AlienFlight F4" @@ -155,7 +155,7 @@ #define CURRENT_METER_SCALE_DEFAULT -667 // ACS712/714-30A - 66.666 mV/A inverted mode // LED strip configuration. -#define LED_STRIP +#define USE_LED_STRIP #define BINDPLUG_PIN PB2 diff --git a/src/main/target/ALIENFLIGHTNGF7/config.c b/src/main/target/ALIENFLIGHTNGF7/config.c index 6193dad004..9d7519a86a 100644 --- a/src/main/target/ALIENFLIGHTNGF7/config.c +++ b/src/main/target/ALIENFLIGHTNGF7/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" #include "config/feature.h" diff --git a/src/main/target/ALIENFLIGHTNGF7/target.h b/src/main/target/ALIENFLIGHTNGF7/target.h index d14d5231ac..9d61178038 100644 --- a/src/main/target/ALIENFLIGHTNGF7/target.h +++ b/src/main/target/ALIENFLIGHTNGF7/target.h @@ -17,11 +17,11 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "AFF7" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define USE_HARDWARE_REVISION_DETECTION #define HW_PIN PC13 -#define BRUSHED_ESC_AUTODETECT +#define USE_BRUSHED_ESC_AUTODETECT #define USBD_PRODUCT_STRING "AlienFlightNG F7" @@ -171,7 +171,7 @@ #define CURRENT_METER_SCALE_DEFAULT -667 // ACS712/714-30A - 66.666 mV/A inverted mode // LED strip configuration. -#define LED_STRIP +#define USE_LED_STRIP #define BINDPLUG_PIN PB2 diff --git a/src/main/target/ALIENWHOOP/config.c b/src/main/target/ALIENWHOOP/config.c index 1d67cb5536..e4b557a3d1 100644 --- a/src/main/target/ALIENWHOOP/config.c +++ b/src/main/target/ALIENWHOOP/config.c @@ -37,7 +37,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "fc/rc_modes.h" #include "common/axis.h" diff --git a/src/main/target/ALIENWHOOP/target.h b/src/main/target/ALIENWHOOP/target.h index 7088c7c4c7..c89bd86a05 100644 --- a/src/main/target/ALIENWHOOP/target.h +++ b/src/main/target/ALIENWHOOP/target.h @@ -44,18 +44,18 @@ #define USBD_PRODUCT_STRING "AlienWhoopF7" #endif -#define TARGET_CONFIG // see config.c for target specific customizations +#define USE_TARGET_CONFIG // see config.c for target specific customizations #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT #define BRUSHED_MOTORS -#define BRUSHED_ESC_AUTODETECT +#define USE_BRUSHED_ESC_AUTODETECT /* Visual Alerts - SMD LEDs */ #define LED0_PIN PC12 // conflicts UART5 #define LED1_PIN PD2 // conflicts UART5 -#define LED_STRIP +#define USE_LED_STRIP /* Lost Quad Mode and Alerts - RCX03-787 Low Voltage Active Buzzer */ @@ -219,7 +219,7 @@ #define I2C1_SCL PB6 #define I2C1_SDA PB7 #else -//#undef CMS // TODO: OSD depends upon CMS +//#undef USE_CMS // TODO: OSD depends upon CMS #undef USE_I2C #endif diff --git a/src/main/target/BEEBRAIN_V2F/config.c b/src/main/target/BEEBRAIN_V2F/config.c index 01b6c95d63..9929497674 100755 --- a/src/main/target/BEEBRAIN_V2F/config.c +++ b/src/main/target/BEEBRAIN_V2F/config.c @@ -21,7 +21,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" #include "common/maths.h" diff --git a/src/main/target/BEEBRAIN_V2F/target.h b/src/main/target/BEEBRAIN_V2F/target.h index b3cbcd3623..1f9c7783f4 100755 --- a/src/main/target/BEEBRAIN_V2F/target.h +++ b/src/main/target/BEEBRAIN_V2F/target.h @@ -18,11 +18,11 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "BBV2" // BeeBrain V2. -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT -#define BRUSHED_ESC_AUTODETECT +#define USE_BRUSHED_ESC_AUTODETECT #define LED0_PIN PB1 #define LED1_PIN PB2 diff --git a/src/main/target/BEEROTORF4/target.h b/src/main/target/BEEROTORF4/target.h index 5865c38929..354367626e 100644 --- a/src/main/target/BEEROTORF4/target.h +++ b/src/main/target/BEEROTORF4/target.h @@ -139,7 +139,7 @@ #define RSSI_ADC_PIN PC2 -#define LED_STRIP +#define USE_LED_STRIP #define TRANSPONDER diff --git a/src/main/target/BETAFLIGHTF4/target.h b/src/main/target/BETAFLIGHTF4/target.h index 073365d1e9..745c8e5763 100755 --- a/src/main/target/BETAFLIGHTF4/target.h +++ b/src/main/target/BETAFLIGHTF4/target.h @@ -123,7 +123,7 @@ #define CURRENT_METER_ADC_PIN PC1 #define VBAT_ADC_PIN PC2 -#define LED_STRIP +#define USE_LED_STRIP #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define SERIALRX_PROVIDER SERIALRX_SBUS @@ -133,7 +133,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define DEFAULT_FEATURES ( FEATURE_TELEMETRY | FEATURE_OSD ) -#define SPEKTRUM_BIND +#define USE_SPEKTRUM_BIND // USART3, #define BIND_PIN PB11 diff --git a/src/main/target/BLUEJAYF4/config.c b/src/main/target/BLUEJAYF4/config.c index bb507f3c6f..479df6107a 100644 --- a/src/main/target/BLUEJAYF4/config.c +++ b/src/main/target/BLUEJAYF4/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "blackbox/blackbox.h" diff --git a/src/main/target/BLUEJAYF4/target.h b/src/main/target/BLUEJAYF4/target.h index c6f6b2c622..b49458cf8b 100644 --- a/src/main/target/BLUEJAYF4/target.h +++ b/src/main/target/BLUEJAYF4/target.h @@ -17,7 +17,7 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "BJF4" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define TARGET_VALIDATECONFIG #define TARGET_PREINIT diff --git a/src/main/target/CC3D/target.h b/src/main/target/CC3D/target.h index 554c87f7db..077ff917b3 100644 --- a/src/main/target/CC3D/target.h +++ b/src/main/target/CC3D/target.h @@ -116,10 +116,10 @@ #undef USE_SERIALRX_SUMD // Graupner Hott protocol #undef USE_SERIALRX_SUMH // Graupner legacy protocol #undef USE_SERIALRX_XBUS // JR -#undef LED_STRIP +#undef USE_LED_STRIP #endif -//#undef LED_STRIP +//#undef USE_LED_STRIP #define DEFAULT_RX_FEATURE FEATURE_RX_PPM // IO - from schematics diff --git a/src/main/target/CHEBUZZF3/target.h b/src/main/target/CHEBUZZF3/target.h index dcac210ff2..19513abd23 100644 --- a/src/main/target/CHEBUZZF3/target.h +++ b/src/main/target/CHEBUZZF3/target.h @@ -116,7 +116,7 @@ #define RSSI_ADC_PIN PC2 #define EXTERNAL1_ADC_PIN PC3 -#undef LED_STRIP +#undef USE_LED_STRIP // IO - assuming 303 in 64pin package, TODO #define TARGET_IO_PORTA 0xffff diff --git a/src/main/target/CJMCU/target.h b/src/main/target/CJMCU/target.h index 1a77791952..2928c2ecbe 100644 --- a/src/main/target/CJMCU/target.h +++ b/src/main/target/CJMCU/target.h @@ -87,9 +87,9 @@ //#define RX_SPI_DEFAULT_PROTOCOL RX_SPI_NRF24_V202_1M #define DEFAULT_RX_FEATURE FEATURE_RX_SPI -//#define TELEMETRY -//#define TELEMETRY_LTM -//#define TELEMETRY_NRF24_LTM +//#define USE_TELEMETRY +//#define USE_TELEMETRY_LTM +//#define USE_TELEMETRY_NRF24_LTM #ifdef USE_PWM #undef USE_PWM #endif @@ -98,8 +98,8 @@ #undef USE_PPM #endif -#ifdef SERIAL_RX -#undef SERIAL_RX +#ifdef USE_SERIAL_RX +#undef USE_SERIAL_RX #endif //#undef SKIP_TASK_STATISTICS diff --git a/src/main/target/CLRACINGF7/target.h b/src/main/target/CLRACINGF7/target.h index ff196d889c..95a257d00a 100644 --- a/src/main/target/CLRACINGF7/target.h +++ b/src/main/target/CLRACINGF7/target.h @@ -142,7 +142,7 @@ #define CURRENT_METER_SCALE_DEFAULT 250 // 3.3/120A = 25mv/A // LED strip configuration. -#define LED_STRIP +#define USE_LED_STRIP #define BINDPLUG_PIN PB2 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL diff --git a/src/main/target/COLIBRI/config.c b/src/main/target/COLIBRI/config.c index 697dbbda95..ffc89a2261 100644 --- a/src/main/target/COLIBRI/config.c +++ b/src/main/target/COLIBRI/config.c @@ -20,7 +20,7 @@ #include "platform.h" -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" diff --git a/src/main/target/COLIBRI/target.h b/src/main/target/COLIBRI/target.h index 53bb5047c7..95cbecfbf9 100644 --- a/src/main/target/COLIBRI/target.h +++ b/src/main/target/COLIBRI/target.h @@ -120,7 +120,7 @@ #define I2C3_SDA PC9 // alternative defaults for Colibri/Gemini target -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/COLIBRI_RACE/i2c_bst.c b/src/main/target/COLIBRI_RACE/i2c_bst.c index b5b11710bf..cf0542f5a1 100644 --- a/src/main/target/COLIBRI_RACE/i2c_bst.c +++ b/src/main/target/COLIBRI_RACE/i2c_bst.c @@ -415,7 +415,7 @@ static bool bstSlaveProcessFeedbackCommand(uint8_t bstRequest) break; -#ifdef LED_STRIP +#ifdef USE_LED_STRIP case BST_LED_COLORS: for (i = 0; i < LED_CONFIGURABLE_COLOR_COUNT; i++) { hsvColor_t *color = &ledStripConfigMutable()->colors[i]; @@ -567,7 +567,7 @@ static bool bstSlaveProcessWriteCommand(uint8_t bstWriteCommand) } break; -#ifdef LED_STRIP +#ifdef USE_LED_STRIP case BST_SET_LED_COLORS: //for (i = 0; i < CONFIGURABLE_COLOR_COUNT; i++) { { diff --git a/src/main/target/EACHIF3/target.h b/src/main/target/EACHIF3/target.h index 6547cd7e82..0d8bdba180 100644 --- a/src/main/target/EACHIF3/target.h +++ b/src/main/target/EACHIF3/target.h @@ -103,7 +103,7 @@ #define USE_BLACKBOX -#define LED_STRIP +#define USE_LED_STRIP #define USE_SERIAL_4WAY_BLHELI_INTERFACE #define BRUSHED_MOTORS diff --git a/src/main/target/ELLE0/target.h b/src/main/target/ELLE0/target.h index 63d5bf8c99..23f6d53539 100644 --- a/src/main/target/ELLE0/target.h +++ b/src/main/target/ELLE0/target.h @@ -92,7 +92,7 @@ #define VBAT_ADC_PIN PC4 #define CURRENT_METER_ADC_PIN PC5 -#undef LED_STRIP +#undef USE_LED_STRIP #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define SERIALRX_PROVIDER SERIALRX_SPEKTRUM2048 diff --git a/src/main/target/F4BY/target.h b/src/main/target/F4BY/target.h index 0773156299..a6ae705db0 100644 --- a/src/main/target/F4BY/target.h +++ b/src/main/target/F4BY/target.h @@ -139,7 +139,7 @@ #define CURRENT_METER_ADC_PIN PC2 #define RSSI_ADC_PIN PC1 -#undef LED_STRIP +#undef USE_LED_STRIP #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define SERIALRX_PROVIDER SERIALRX_SBUS diff --git a/src/main/target/FF_FORTINIF4/config.c b/src/main/target/FF_FORTINIF4/config.c index d427645ad5..20f8c1fea8 100644 --- a/src/main/target/FF_FORTINIF4/config.c +++ b/src/main/target/FF_FORTINIF4/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "fc/config.h" #include "config/feature.h" diff --git a/src/main/target/FF_FORTINIF4/target.h b/src/main/target/FF_FORTINIF4/target.h index efcfbf0c89..e244a4287a 100644 --- a/src/main/target/FF_FORTINIF4/target.h +++ b/src/main/target/FF_FORTINIF4/target.h @@ -18,13 +18,13 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "FORT" #define USBD_PRODUCT_STRING "FortiniF4" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define USE_HARDWARE_REVISION_DETECTION #define HW_PIN PC14 /*--------------LED----------------*/ #define LED0_PIN PB5 #define LED1_PIN PB6 -#define LED_STRIP +#define USE_LED_STRIP /*---------------------------------*/ /*------------BEEPER---------------*/ diff --git a/src/main/target/FF_PIKOBLX/config.c b/src/main/target/FF_PIKOBLX/config.c index e51091d5c3..7c4bb46987 100644 --- a/src/main/target/FF_PIKOBLX/config.c +++ b/src/main/target/FF_PIKOBLX/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" #include "config/feature.h" diff --git a/src/main/target/FF_PIKOBLX/target.h b/src/main/target/FF_PIKOBLX/target.h index 87efb95993..ca2549cf3b 100644 --- a/src/main/target/FF_PIKOBLX/target.h +++ b/src/main/target/FF_PIKOBLX/target.h @@ -29,8 +29,8 @@ #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT -#define TARGET_CONFIG -#define BRUSHED_ESC_AUTODETECT +#define USE_TARGET_CONFIG +#define USE_BRUSHED_ESC_AUTODETECT #define LED0_PIN PB9 #define LED1_PIN PB5 diff --git a/src/main/target/FF_PIKOF4/config.c b/src/main/target/FF_PIKOF4/config.c index 8cbd093706..4d28eca495 100644 --- a/src/main/target/FF_PIKOF4/config.c +++ b/src/main/target/FF_PIKOF4/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "telemetry/telemetry.h" void targetConfiguration(void) diff --git a/src/main/target/FF_PIKOF4/target.h b/src/main/target/FF_PIKOF4/target.h index 5628effcab..5574c684a9 100644 --- a/src/main/target/FF_PIKOF4/target.h +++ b/src/main/target/FF_PIKOF4/target.h @@ -18,11 +18,11 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "PIK4" #define USBD_PRODUCT_STRING "PikoF4" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG /*--------------LED----------------*/ #define LED0_PIN PA15 #define LED1_PIN PB6 -#define LED_STRIP +#define USE_LED_STRIP /*---------------------------------*/ /*------------BEEPER---------------*/ diff --git a/src/main/target/FRSKYF3/config.c b/src/main/target/FRSKYF3/config.c index d39e3c48af..bc0ef6c218 100644 --- a/src/main/target/FRSKYF3/config.c +++ b/src/main/target/FRSKYF3/config.c @@ -18,7 +18,7 @@ #include #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "drivers/io.h" #include "rx/rx.h" #include "io/serial.h" diff --git a/src/main/target/FRSKYF3/target.h b/src/main/target/FRSKYF3/target.h index b162eef9c7..a2d28d3c1b 100644 --- a/src/main/target/FRSKYF3/target.h +++ b/src/main/target/FRSKYF3/target.h @@ -18,12 +18,12 @@ #pragma once // no space left -#undef TELEMETRY_JETIEXBUS +#undef USE_TELEMETRY_JETIEXBUS #undef USE_TELEMETRY_HOTT #undef USE_TELEMETRY_LTM #define TARGET_BOARD_IDENTIFIER "FRF3" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE #define LED0_PIN PB3 diff --git a/src/main/target/FRSKYF4/config.c b/src/main/target/FRSKYF4/config.c index d39e3c48af..bc0ef6c218 100644 --- a/src/main/target/FRSKYF4/config.c +++ b/src/main/target/FRSKYF4/config.c @@ -18,7 +18,7 @@ #include #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "drivers/io.h" #include "rx/rx.h" #include "io/serial.h" diff --git a/src/main/target/FRSKYF4/target.h b/src/main/target/FRSKYF4/target.h index d5cd4e53f9..e8337cff0c 100644 --- a/src/main/target/FRSKYF4/target.h +++ b/src/main/target/FRSKYF4/target.h @@ -17,7 +17,7 @@ #define TARGET_BOARD_IDENTIFIER "FRF4" #define USBD_PRODUCT_STRING "FRSKYF4" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define LED0_PIN PB5 #define BEEPER PB4 diff --git a/src/main/target/FURYF7/target.h b/src/main/target/FURYF7/target.h index c85e59181c..5ea5fafa48 100644 --- a/src/main/target/FURYF7/target.h +++ b/src/main/target/FURYF7/target.h @@ -134,7 +134,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT -#undef LED_STRIP +#undef USE_LED_STRIP #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define SERIALRX_PROVIDER SERIALRX_SBUS diff --git a/src/main/target/IRCFUSIONF3/target.h b/src/main/target/IRCFUSIONF3/target.h index e39b868b88..a52b00fb13 100644 --- a/src/main/target/IRCFUSIONF3/target.h +++ b/src/main/target/IRCFUSIONF3/target.h @@ -79,7 +79,7 @@ #define CURRENT_METER_ADC_PIN PA5 #define RSSI_ADC_PIN PB2 -#undef LED_STRIP +#undef USE_LED_STRIP #define USE_SERIAL_4WAY_BLHELI_INTERFACE diff --git a/src/main/target/KAKUTEF4/config.c b/src/main/target/KAKUTEF4/config.c index ba1d2f953e..8b9c455ded 100644 --- a/src/main/target/KAKUTEF4/config.c +++ b/src/main/target/KAKUTEF4/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "io/serial.h" diff --git a/src/main/target/KAKUTEF4/target.h b/src/main/target/KAKUTEF4/target.h index 7f3530aecb..a23b51cb13 100644 --- a/src/main/target/KAKUTEF4/target.h +++ b/src/main/target/KAKUTEF4/target.h @@ -24,7 +24,7 @@ #define USBD_PRODUCT_STRING "KakuteF4-V1" #endif -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define LED0_PIN PB5 #define LED1_PIN PB4 diff --git a/src/main/target/KAKUTEF7/target.h b/src/main/target/KAKUTEF7/target.h index 992f4c1589..2dab60b735 100644 --- a/src/main/target/KAKUTEF7/target.h +++ b/src/main/target/KAKUTEF7/target.h @@ -15,7 +15,7 @@ #pragma once -//#define TARGET_CONFIG +//#define USE_TARGET_CONFIG #define TARGET_BOARD_IDENTIFIER "KTF7" #define USBD_PRODUCT_STRING "KakuteF7" @@ -168,7 +168,7 @@ #define VBAT_ADC_PIN PC3 #define RSSI_ADC_PIN PC5 -#define LED_STRIP +#define USE_LED_STRIP #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT diff --git a/src/main/target/KISSFC/config.c b/src/main/target/KISSFC/config.c index f915bec091..f4bfa711a5 100755 --- a/src/main/target/KISSFC/config.c +++ b/src/main/target/KISSFC/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "fc/config.h" diff --git a/src/main/target/KISSFC/target.h b/src/main/target/KISSFC/target.h index cdf21eb807..9089b8ea68 100644 --- a/src/main/target/KISSFC/target.h +++ b/src/main/target/KISSFC/target.h @@ -39,7 +39,7 @@ #define USE_MPU_DATA_READY_SIGNAL #define ENSURE_MPU_DATA_READY_IS_LOW #ifdef KISSCC -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define USE_GYRO #define USE_GYRO_MPU6050 @@ -48,7 +48,7 @@ #define USE_ACC #define USE_ACC_MPU6050 #define ACC_MPU6050_ALIGN CW90_DEG -#undef LED_STRIP +#undef USE_LED_STRIP #else #define USE_GYRO #define USE_GYRO_MPU6050 diff --git a/src/main/target/KIWIF4/target.h b/src/main/target/KIWIF4/target.h index 5785f4c13b..46fe4b43b4 100644 --- a/src/main/target/KIWIF4/target.h +++ b/src/main/target/KIWIF4/target.h @@ -161,7 +161,7 @@ #define I2C1_SDA PB7 */ -#define LED_STRIP +#define USE_LED_STRIP #define USE_ADC #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC diff --git a/src/main/target/KROOZX/config.c b/src/main/target/KROOZX/config.c index a08100eb16..772f59a282 100755 --- a/src/main/target/KROOZX/config.c +++ b/src/main/target/KROOZX/config.c @@ -30,7 +30,7 @@ #define VBAT_SCALE 113 -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG void targetConfiguration(void) { voltageSensorADCConfigMutable(VOLTAGE_SENSOR_ADC_VBAT)->vbatscale = VBAT_SCALE; diff --git a/src/main/target/KROOZX/target.h b/src/main/target/KROOZX/target.h index 7c28cbdd59..97fc0c1aea 100755 --- a/src/main/target/KROOZX/target.h +++ b/src/main/target/KROOZX/target.h @@ -24,7 +24,7 @@ #define USBD_PRODUCT_STRING "KroozX" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define TARGET_PREINIT #define LED0_PIN PA14 // Red LED @@ -149,7 +149,7 @@ #define RX_CHANNELS_TAER #define DEFAULT_FEATURES (FEATURE_OSD) -#define LED_STRIP +#define USE_LED_STRIP #define USE_SERIAL_4WAY_BLHELI_INTERFACE diff --git a/src/main/target/LUMBAF3/target.h b/src/main/target/LUMBAF3/target.h index d8da3b6d3f..11d3a69ec3 100644 --- a/src/main/target/LUMBAF3/target.h +++ b/src/main/target/LUMBAF3/target.h @@ -75,7 +75,7 @@ #define USE_SERIAL_4WAY_BLHELI_INTERFACE -#define LED_STRIP +#define USE_LED_STRIP #define CAMERA_CONTROL_PIN PA15 diff --git a/src/main/target/MATEKF405/target.h b/src/main/target/MATEKF405/target.h index e8ca228945..d304519e57 100644 --- a/src/main/target/MATEKF405/target.h +++ b/src/main/target/MATEKF405/target.h @@ -150,7 +150,7 @@ #define DEFAULT_FEATURES (FEATURE_OSD ) -#define LED_STRIP +#define USE_LED_STRIP #define USE_ESCSERIAL #define ESCSERIAL_TIMER_TX_PIN PA3 diff --git a/src/main/target/MATEKF722/target.h b/src/main/target/MATEKF722/target.h index ce0668a130..2955f39038 100644 --- a/src/main/target/MATEKF722/target.h +++ b/src/main/target/MATEKF722/target.h @@ -127,9 +127,9 @@ #define DEFAULT_FEATURES (FEATURE_OSD ) -#define LED_STRIP +#define USE_LED_STRIP -#define SPEKTRUM_BIND +#define USE_SPEKTRUM_BIND #define BIND_PIN PA1 // USART4 RX #define USE_ESCSERIAL diff --git a/src/main/target/MOTOLAB/config.c b/src/main/target/MOTOLAB/config.c index ee9abc666a..f9b93aeb8b 100755 --- a/src/main/target/MOTOLAB/config.c +++ b/src/main/target/MOTOLAB/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "fc/config.h" diff --git a/src/main/target/MOTOLAB/target.h b/src/main/target/MOTOLAB/target.h index 4f0ab550cc..7f9da25419 100644 --- a/src/main/target/MOTOLAB/target.h +++ b/src/main/target/MOTOLAB/target.h @@ -20,7 +20,7 @@ #define TARGET_BOARD_IDENTIFIER "MOTO" // MotoLab #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define LED0_PIN PB5 // Blue LEDs - PB5 //#define LED1_PIN PB9 // Green LEDs - PB9 diff --git a/src/main/target/MOTOLABF4/config.c b/src/main/target/MOTOLABF4/config.c index 94c8bf946d..4f5ce48207 100644 --- a/src/main/target/MOTOLABF4/config.c +++ b/src/main/target/MOTOLABF4/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "telemetry/telemetry.h" #include "fc/config.h" diff --git a/src/main/target/MOTOLABF4/target.h b/src/main/target/MOTOLABF4/target.h index dbe45e0302..8addc6378f 100644 --- a/src/main/target/MOTOLABF4/target.h +++ b/src/main/target/MOTOLABF4/target.h @@ -17,7 +17,7 @@ #pragma once -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #undef USE_MSP_DISPLAYPORT #ifdef MLTEMPF4 @@ -140,7 +140,7 @@ #define USE_DSHOT #define USE_ESC_TELEMETRY #define SENSORS_SET (SENSOR_ACC) -#define LED_STRIP +#define USE_LED_STRIP #define USE_SERIAL_4WAY_BLHELI_INTERFACE #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT @@ -154,7 +154,7 @@ #define CURRENT_METER_SCALE_DEFAULT 140 // USART5 Rx, PD2 -#define SPEKTRUM_BIND +#define USE_SPEKTRUM_BIND #define BIND_PIN UART5_RX_PIN #define TARGET_IO_PORTA 0xffff diff --git a/src/main/target/MULTIFLITEPICO/config.c b/src/main/target/MULTIFLITEPICO/config.c index d1814fbb69..4247040ce6 100755 --- a/src/main/target/MULTIFLITEPICO/config.c +++ b/src/main/target/MULTIFLITEPICO/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" #include "common/maths.h" diff --git a/src/main/target/MULTIFLITEPICO/target.h b/src/main/target/MULTIFLITEPICO/target.h index 8fa4fdca8e..514555a6c3 100644 --- a/src/main/target/MULTIFLITEPICO/target.h +++ b/src/main/target/MULTIFLITEPICO/target.h @@ -18,7 +18,7 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "MFPB" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE diff --git a/src/main/target/NAZE/config.c b/src/main/target/NAZE/config.c index 1a1f894a87..5aa80ec562 100755 --- a/src/main/target/NAZE/config.c +++ b/src/main/target/NAZE/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" #include "common/utils.h" diff --git a/src/main/target/NAZE/target.h b/src/main/target/NAZE/target.h index e74d856598..36c672028c 100644 --- a/src/main/target/NAZE/target.h +++ b/src/main/target/NAZE/target.h @@ -17,9 +17,9 @@ #pragma once -#define TELEMETRY_IBUS +#define USE_TELEMETRY_IBUS -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define TARGET_VALIDATECONFIG #define USE_HARDWARE_REVISION_DETECTION #define TARGET_BUS_INIT @@ -38,7 +38,7 @@ #define BRUSHED_MOTORS #undef USE_SERVOS #define TARGET_BOARD_IDENTIFIER "BEBR" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define DEFAULT_FEATURES FEATURE_MOTOR_STOP #else #define TARGET_BOARD_IDENTIFIER "AFNA" diff --git a/src/main/target/OMNIBUS/target.h b/src/main/target/OMNIBUS/target.h index 465592372e..4c3ac7b07b 100644 --- a/src/main/target/OMNIBUS/target.h +++ b/src/main/target/OMNIBUS/target.h @@ -17,10 +17,10 @@ #pragma once -#undef TELEMETRY_IBUS //no space left -#undef TELEMETRY_HOTT //no space left -#undef TELEMETRY_JETIEXBUS // no space left -#undef TELEMETRY_MAVLINK // no space left +#undef USE_TELEMETRY_IBUS //no space left +#undef USE_TELEMETRY_HOTT //no space left +#undef USE_TELEMETRY_JETIEXBUS // no space left +#undef USE_TELEMETRY_MAVLINK // no space left #undef USE_RCDEVICE // no space left #undef USE_RTC_TIME // no space left @@ -161,7 +161,7 @@ #define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define DEFAULT_FEATURES (FEATURE_OSD) -#define BUTTONS +#define USE_BUTTONS #define BUTTON_A_PIN PB1 #define BUTTON_B_PIN PB0 diff --git a/src/main/target/OMNIBUSF4/config.c b/src/main/target/OMNIBUSF4/config.c index 627743767d..9125fa9c9a 100644 --- a/src/main/target/OMNIBUSF4/config.c +++ b/src/main/target/OMNIBUSF4/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "config/parameter_group.h" #include "drivers/max7456.h" diff --git a/src/main/target/OMNIBUSF4/target.h b/src/main/target/OMNIBUSF4/target.h index a5420c00a6..950aadf346 100644 --- a/src/main/target/OMNIBUSF4/target.h +++ b/src/main/target/OMNIBUSF4/target.h @@ -15,7 +15,7 @@ #pragma once -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #if defined(OMNIBUSF4SD) #define TARGET_BOARD_IDENTIFIER "OBSD" diff --git a/src/main/target/OMNIBUSF7/config.c b/src/main/target/OMNIBUSF7/config.c index b444727906..1167d2c660 100644 --- a/src/main/target/OMNIBUSF7/config.c +++ b/src/main/target/OMNIBUSF7/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "io/serial.h" diff --git a/src/main/target/OMNIBUSF7/target.h b/src/main/target/OMNIBUSF7/target.h index b0ef14c996..789c15b7cd 100644 --- a/src/main/target/OMNIBUSF7/target.h +++ b/src/main/target/OMNIBUSF7/target.h @@ -15,7 +15,7 @@ #pragma once -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #ifdef OMNIBUSF7V2 #define TARGET_BOARD_IDENTIFIER "OB72" @@ -187,7 +187,7 @@ #define VBAT_ADC_PIN PC3 #define RSSI_ADC_PIN PC5 -#define LED_STRIP +#define USE_LED_STRIP #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT diff --git a/src/main/target/RACEBASE/config.c b/src/main/target/RACEBASE/config.c index b00357784e..cc72e41cf8 100755 --- a/src/main/target/RACEBASE/config.c +++ b/src/main/target/RACEBASE/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "fc/config.h" diff --git a/src/main/target/RACEBASE/target.h b/src/main/target/RACEBASE/target.h index 484069f8f7..c744c35ff6 100644 --- a/src/main/target/RACEBASE/target.h +++ b/src/main/target/RACEBASE/target.h @@ -19,7 +19,7 @@ #define TARGET_BOARD_IDENTIFIER "RBFC" #define USE_HARDWARE_REVISION_DETECTION -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define LED0_PIN PB3 #define LED0_INVERTED diff --git a/src/main/target/RCEXPLORERF3/target.h b/src/main/target/RCEXPLORERF3/target.h index ca1deff29d..603b7cfc5c 100644 --- a/src/main/target/RCEXPLORERF3/target.h +++ b/src/main/target/RCEXPLORERF3/target.h @@ -104,10 +104,7 @@ #define SERIALRX_PROVIDER SERIALRX_SBUS #define SERIALRX_UART SERIAL_PORT_USART1 -#define NAV -#define NAV_AUTO_MAG_DECLINATION -#define NAV_GPS_GLITCH_DETECTION -#define NAV_MAX_WAYPOINTS 60 +#define USE_NAV #define USE_SERIAL_4WAY_BLHELI_INTERFACE diff --git a/src/main/target/REVONANO/target.h b/src/main/target/REVONANO/target.h index 16c23de062..1ad62c3532 100644 --- a/src/main/target/REVONANO/target.h +++ b/src/main/target/REVONANO/target.h @@ -76,7 +76,7 @@ #define USE_I2C_DEVICE_1 // UART1/FlexiPort (PB6,PB7) #define I2C_DEVICE (I2CDEV_1) -#undef LED_STRIP +#undef USE_LED_STRIP #define USE_ADC #define CURRENT_METER_ADC_PIN PA7 diff --git a/src/main/target/RG_SSD_F3/config.c b/src/main/target/RG_SSD_F3/config.c index 88b348d2c7..7c519d471e 100644 --- a/src/main/target/RG_SSD_F3/config.c +++ b/src/main/target/RG_SSD_F3/config.c @@ -19,7 +19,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "fc/config.h" diff --git a/src/main/target/RG_SSD_F3/target.h b/src/main/target/RG_SSD_F3/target.h index 749b78807d..7400d6cdd4 100644 --- a/src/main/target/RG_SSD_F3/target.h +++ b/src/main/target/RG_SSD_F3/target.h @@ -51,7 +51,7 @@ #define USE_ACC_SPI_MPU6000 #define ACC_MPU6000_ALIGN CW180_DEG #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define USE_EXTI #define MPU_INT_EXTI PC13 diff --git a/src/main/target/SITL/target.h b/src/main/target/SITL/target.h index 39dcf479ee..8012befe44 100644 --- a/src/main/target/SITL/target.h +++ b/src/main/target/SITL/target.h @@ -84,12 +84,12 @@ #undef STACK_CHECK // I think SITL don't need this #undef USE_DASHBOARD -#undef TELEMETRY_LTM +#undef USE_TELEMETRY_LTM #undef USE_ADC #undef USE_VCP #undef USE_PPM #undef USE_PWM -#undef SERIAL_RX +#undef USE_SERIAL_RX #undef USE_SERIALRX_CRSF #undef USE_SERIALRX_IBUS #undef USE_SERIALRX_SBUS @@ -97,17 +97,17 @@ #undef USE_SERIALRX_SUMD #undef USE_SERIALRX_SUMH #undef USE_SERIALRX_XBUS -#undef LED_STRIP -#undef TELEMETRY_FRSKY -#undef TELEMETRY_HOTT -#undef TELEMETRY_SMARTPORT -#undef TELEMETRY_MAVLINK +#undef USE_LED_STRIP +#undef USE_TELEMETRY_FRSKY +#undef USE_TELEMETRY_HOTT +#undef USE_TELEMETRY_SMARTPORT +#undef USE_TELEMETRY_MAVLINK #undef USE_RESOURCE_MGMT #undef USE_CMS -#undef TELEMETRY_CRSF -#undef TELEMETRY_IBUS -#undef TELEMETRY_JETIEXBUS -#undef TELEMETRY_SRXL +#undef USE_TELEMETRY_CRSF +#undef USE_TELEMETRY_IBUS +#undef USE_TELEMETRY_JETIEXBUS +#undef USE_TELEMETRY_SRXL #undef USE_SERIALRX_JETIEXBUS #undef VTX_COMMON #undef VTX_CONTROL diff --git a/src/main/target/SPARKY2/target.h b/src/main/target/SPARKY2/target.h index 13520a2334..f741205d47 100644 --- a/src/main/target/SPARKY2/target.h +++ b/src/main/target/SPARKY2/target.h @@ -116,7 +116,7 @@ #define VBAT_ADC_PIN PC1 #define CURRENT_METER_ADC_PIN PC2 -#undef LED_STRIP +#undef USE_LED_STRIP #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define SERIALRX_PROVIDER SERIALRX_SBUS diff --git a/src/main/target/SPRACINGF3EVO/config.c b/src/main/target/SPRACINGF3EVO/config.c index 6d9231ce1a..5506ee1866 100644 --- a/src/main/target/SPRACINGF3EVO/config.c +++ b/src/main/target/SPRACINGF3EVO/config.c @@ -17,7 +17,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "common/axis.h" diff --git a/src/main/target/SPRACINGF3EVO/target.h b/src/main/target/SPRACINGF3EVO/target.h index 9845811b02..7a3c83fc3a 100644 --- a/src/main/target/SPRACINGF3EVO/target.h +++ b/src/main/target/SPRACINGF3EVO/target.h @@ -25,10 +25,10 @@ #define TARGET_BOARD_IDENTIFIER "SPEV" #endif -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #ifdef AIORACERF3 -#undef TARGET_CONFIG // no space left +#undef USE_TARGET_CONFIG // no space left #endif #ifdef SPRACINGF3MQ @@ -40,15 +40,14 @@ #undef USE_UNCOMMON_MIXERS // no space left #endif -#undef TELEMETRY_JETIEXBUS // no space left +#undef USE_TELEMETRY_JETIEXBUS // no space left #undef USE_SERIALRX_JETIEXBUS // no space left #undef USE_DASHBOARD // no space left #undef USE_RTC_TIME // no space left - #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT -#define BRUSHED_ESC_AUTODETECT +#define USE_BRUSHED_ESC_AUTODETECT #define LED0_PIN PB8 diff --git a/src/main/target/SPRACINGF3MINI/target.h b/src/main/target/SPRACINGF3MINI/target.h index 563fa58e19..1a9b33d426 100644 --- a/src/main/target/SPRACINGF3MINI/target.h +++ b/src/main/target/SPRACINGF3MINI/target.h @@ -78,7 +78,7 @@ //#define SONAR_ECHO_PIN PB1 //#define SONAR_TRIGGER_PIN PB0 -#define BRUSHED_ESC_AUTODETECT +#define USE_BRUSHED_ESC_AUTODETECT #define USE_VCP #define USE_UART1 @@ -186,7 +186,7 @@ #ifndef TINYBEEF3 -#define BUTTONS +#define USE_BUTTONS #define BUTTON_A_PIN PB1 #define BUTTON_B_PIN PB0 diff --git a/src/main/target/SPRACINGF3NEO/config.c b/src/main/target/SPRACINGF3NEO/config.c index 31fb0e6dda..3100d67846 100644 --- a/src/main/target/SPRACINGF3NEO/config.c +++ b/src/main/target/SPRACINGF3NEO/config.c @@ -46,7 +46,7 @@ #include "fc/config.h" -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG void targetConfiguration(void) { barometerConfigMutable()->baro_hardware = BARO_DEFAULT; diff --git a/src/main/target/SPRACINGF3NEO/target.h b/src/main/target/SPRACINGF3NEO/target.h index ce29e12587..529ea0f8da 100644 --- a/src/main/target/SPRACINGF3NEO/target.h +++ b/src/main/target/SPRACINGF3NEO/target.h @@ -18,7 +18,7 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "SP3N" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT @@ -172,7 +172,7 @@ #define TELEMETRY_UART SERIAL_PORT_UART5 #define TELEMETRY_PROVIDER_DEFAULT FUNCTION_TELEMETRY_SMARTPORT -#define BUTTONS // Physically located on the optional OSD/VTX board. +#define USE_BUTTONS // Physically located on the optional OSD/VTX board. #define BUTTON_A_PIN PD2 // FIXME While it's possible to use the button on the OSD/VTX board for binding enabling it here will break binding unless you have the OSD/VTX connected. diff --git a/src/main/target/SPRACINGF3OSD/config.c b/src/main/target/SPRACINGF3OSD/config.c index 52d3b5b40d..2bbe96036d 100644 --- a/src/main/target/SPRACINGF3OSD/config.c +++ b/src/main/target/SPRACINGF3OSD/config.c @@ -28,7 +28,7 @@ #include "fc/config.h" -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG void targetConfiguration(void) { serialConfigMutable()->portConfigs[1].functionMask = FUNCTION_MSP; // To connect to FC. diff --git a/src/main/target/SPRACINGF3OSD/target.h b/src/main/target/SPRACINGF3OSD/target.h index a7b5831edf..5798b11916 100644 --- a/src/main/target/SPRACINGF3OSD/target.h +++ b/src/main/target/SPRACINGF3OSD/target.h @@ -18,7 +18,7 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "SOF3" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT diff --git a/src/main/target/SPRACINGF4EVO/config.c b/src/main/target/SPRACINGF4EVO/config.c index 9e96f3edf6..1bfae2fa49 100644 --- a/src/main/target/SPRACINGF4EVO/config.c +++ b/src/main/target/SPRACINGF4EVO/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "io/serial.h" diff --git a/src/main/target/SPRACINGF4EVO/target.h b/src/main/target/SPRACINGF4EVO/target.h index 3f2cd856f0..91aaded432 100644 --- a/src/main/target/SPRACINGF4EVO/target.h +++ b/src/main/target/SPRACINGF4EVO/target.h @@ -18,7 +18,7 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "SP4E" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #ifndef SPRACINGF4EVO_REV #define SPRACINGF4EVO_REV 2 @@ -59,8 +59,6 @@ #define USE_MAG_AK8975 #define USE_MAG_HMC5883 -#define USB_IO - #define USE_VCP #define USE_UART1 #define USE_UART2 @@ -163,7 +161,7 @@ #define USE_OSD_OVER_MSP_DISPLAYPORT #define USE_MSP_CURRENT_METER -#define LED_STRIP +#define USE_LED_STRIP #define TRANSPONDER #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT diff --git a/src/main/target/SPRACINGF4NEO/config.c b/src/main/target/SPRACINGF4NEO/config.c index d64bde9ed1..50631ec3ec 100644 --- a/src/main/target/SPRACINGF4NEO/config.c +++ b/src/main/target/SPRACINGF4NEO/config.c @@ -26,7 +26,7 @@ #include "fc/config.h" -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG void targetConfiguration(void) { serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(GPS_UART)].functionMask = FUNCTION_GPS; diff --git a/src/main/target/SPRACINGF4NEO/target.h b/src/main/target/SPRACINGF4NEO/target.h index bef03d20d1..29c2adc82f 100644 --- a/src/main/target/SPRACINGF4NEO/target.h +++ b/src/main/target/SPRACINGF4NEO/target.h @@ -18,7 +18,7 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "SP4N" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #ifndef SPRACINGF4NEO_REV #define SPRACINGF4NEO_REV 3 @@ -74,8 +74,6 @@ #define USE_MAG_AK8975 #define USE_MAG_HMC5883 -#define USB_IO - #define USE_VCP #define USE_UART1 #define USE_UART2 @@ -190,7 +188,7 @@ #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC -#define LED_STRIP +#define USE_LED_STRIP #define TRANSPONDER #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT @@ -206,7 +204,7 @@ #define TELEMETRY_UART SERIAL_PORT_UART5 #define TELEMETRY_PROVIDER_DEFAULT FUNCTION_TELEMETRY_SMARTPORT -#define BUTTONS // Physically located on the optional OSD/VTX board. +#define USE_BUTTONS // Physically located on the optional OSD/VTX board. #if (SPRACINGF4NEO_REV >= 3) #define BUTTON_A_PIN PB0 #else diff --git a/src/main/target/STM32F3DISCOVERY/target.h b/src/main/target/STM32F3DISCOVERY/target.h index cdd6f25b23..ac44850b7b 100644 --- a/src/main/target/STM32F3DISCOVERY/target.h +++ b/src/main/target/STM32F3DISCOVERY/target.h @@ -31,7 +31,7 @@ #define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE -#undef TELEMETRY_JETIEXBUS // ROM SAVING +#undef USE_TELEMETRY_JETIEXBUS // ROM SAVING #define CURRENT_TARGET_CPU_VOLTAGE 3.0 diff --git a/src/main/target/TINYFISH/config.c b/src/main/target/TINYFISH/config.c index 411c8e0de3..96c8798cf3 100644 --- a/src/main/target/TINYFISH/config.c +++ b/src/main/target/TINYFISH/config.c @@ -19,7 +19,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "drivers/dma.h" #include "drivers/io.h" #include "drivers/timer.h" diff --git a/src/main/target/TINYFISH/target.h b/src/main/target/TINYFISH/target.h index 6fe5e184c2..007fb20dd2 100644 --- a/src/main/target/TINYFISH/target.h +++ b/src/main/target/TINYFISH/target.h @@ -119,7 +119,7 @@ #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define DEFAULT_FEATURES ( FEATURE_TELEMETRY ) -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define USE_SERIAL_4WAY_BLHELI_INTERFACE diff --git a/src/main/target/VRRACE/target.h b/src/main/target/VRRACE/target.h index 1cdaf67874..3a5d42112a 100644 --- a/src/main/target/VRRACE/target.h +++ b/src/main/target/VRRACE/target.h @@ -153,7 +153,7 @@ #define RSSI_ADC_PIN PB1 #define CURRENT_METER_ADC_PIN PA5 -#undef LED_STRIP +#undef USE_LED_STRIP #define DEFAULT_FEATURES (FEATURE_SOFTSERIAL | FEATURE_TELEMETRY) #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL diff --git a/src/main/target/YUPIF4/config.c b/src/main/target/YUPIF4/config.c index 19d70e8a7a..4438c91bef 100644 --- a/src/main/target/YUPIF4/config.c +++ b/src/main/target/YUPIF4/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "blackbox/blackbox.h" #include "fc/config.h" #include "flight/pid.h" diff --git a/src/main/target/YUPIF4/target.h b/src/main/target/YUPIF4/target.h index f76cde3d2a..f8b259d8be 100644 --- a/src/main/target/YUPIF4/target.h +++ b/src/main/target/YUPIF4/target.h @@ -17,7 +17,7 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "YPF4" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define USBD_PRODUCT_STRING "YupiF4" diff --git a/src/main/target/YUPIF7/config.c b/src/main/target/YUPIF7/config.c index b83870d235..170ada8295 100644 --- a/src/main/target/YUPIF7/config.c +++ b/src/main/target/YUPIF7/config.c @@ -20,7 +20,7 @@ #include -#ifdef TARGET_CONFIG +#ifdef USE_TARGET_CONFIG #include "fc/config.h" #include "flight/pid.h" diff --git a/src/main/target/YUPIF7/target.h b/src/main/target/YUPIF7/target.h index 0f05401fd1..5198895e3c 100644 --- a/src/main/target/YUPIF7/target.h +++ b/src/main/target/YUPIF7/target.h @@ -17,7 +17,7 @@ #pragma once #define TARGET_BOARD_IDENTIFIER "YPF7" -#define TARGET_CONFIG +#define USE_TARGET_CONFIG #define USBD_PRODUCT_STRING "YUPIF7" @@ -110,7 +110,7 @@ #define CURRENT_METER_SCALE_DEFAULT 250 // 3.3/120A = 25mv/A // LED strip configuration. -#define LED_STRIP +#define USE_LED_STRIP // Default configuration #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL diff --git a/src/main/target/common_fc_post.h b/src/main/target/common_fc_post.h index 95728fb07d..bf20956a17 100644 --- a/src/main/target/common_fc_post.h +++ b/src/main/target/common_fc_post.h @@ -56,7 +56,7 @@ #endif #if defined(USE_MSP_OVER_TELEMETRY) -#if !defined(TELEMETRY_SMARTPORT) && !defined(TELEMETRY_CRSF) +#if !defined(USE_TELEMETRY_SMARTPORT) && !defined(USE_TELEMETRY_CRSF) #undef USE_MSP_OVER_TELEMETRY #endif #endif diff --git a/src/main/target/common_fc_pre.h b/src/main/target/common_fc_pre.h index 8e970c772c..2368b3aeac 100644 --- a/src/main/target/common_fc_pre.h +++ b/src/main/target/common_fc_pre.h @@ -48,7 +48,7 @@ #define USE_DSHOT #define USE_ESC_SENSOR #define I2C3_OVERCLOCK true -#define TELEMETRY_IBUS +#define USE_TELEMETRY_IBUS #define USE_GYRO_DATA_ANALYSE #endif @@ -58,7 +58,7 @@ #define USE_ESC_SENSOR #define I2C3_OVERCLOCK true #define I2C4_OVERCLOCK true -#define TELEMETRY_IBUS +#define USE_TELEMETRY_IBUS #define USE_GYRO_DATA_ANALYSE #endif @@ -79,7 +79,7 @@ #define USE_CLI #define USE_PPM #define USE_PWM -#define SERIAL_RX +#define USE_SERIAL_RX #define USE_SERIALRX_CRSF // Team Black Sheep Crossfire protocol #define USE_SERIALRX_IBUS // FlySky and Turnigy receivers #define USE_SERIALRX_SBUS // Frsky and Futaba receivers @@ -96,23 +96,23 @@ #if (FLASH_SIZE > 64) #define USE_BLACKBOX -#define LED_STRIP -#define TELEMETRY -#define TELEMETRY_FRSKY -#define TELEMETRY_HOTT -#define TELEMETRY_LTM -#define TELEMETRY_SMARTPORT +#define USE_LED_STRIP +#define USE_TELEMETRY +#define USE_TELEMETRY_FRSKY +#define USE_TELEMETRY_HOTT +#define USE_TELEMETRY_LTM +#define USE_TELEMETRY_SMARTPORT #define USE_RESOURCE_MGMT #define USE_SERVOS #endif #if (FLASH_SIZE > 128) #define USE_CMS -#define TELEMETRY_CRSF -#define TELEMETRY_IBUS -#define TELEMETRY_JETIEXBUS -#define TELEMETRY_MAVLINK -#define TELEMETRY_SRXL +#define USE_TELEMETRY_CRSF +#define USE_TELEMETRY_IBUS +#define USE_TELEMETRY_JETIEXBUS +#define USE_TELEMETRY_MAVLINK +#define USE_TELEMETRY_SRXL #define USE_DASHBOARD #define USE_MSP_DISPLAYPORT #define USE_RCDEVICE diff --git a/src/main/telemetry/crsf.c b/src/main/telemetry/crsf.c index 23abe9ad98..2e0165136b 100644 --- a/src/main/telemetry/crsf.c +++ b/src/main/telemetry/crsf.c @@ -21,7 +21,7 @@ #include "platform.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "config/feature.h" #include "build/atomic.h" diff --git a/src/main/telemetry/frsky.c b/src/main/telemetry/frsky.c index daa4945a66..81ab4f52f9 100644 --- a/src/main/telemetry/frsky.c +++ b/src/main/telemetry/frsky.c @@ -26,7 +26,7 @@ #include "platform.h" -#if defined(TELEMETRY) && defined(TELEMETRY_FRSKY) +#if defined(USE_TELEMETRY) && defined(USE_TELEMETRY_FRSKY) #include "common/maths.h" #include "common/axis.h" diff --git a/src/main/telemetry/hott.c b/src/main/telemetry/hott.c index 554f8bbedf..36f39cc53a 100644 --- a/src/main/telemetry/hott.c +++ b/src/main/telemetry/hott.c @@ -59,7 +59,7 @@ #include "platform.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "build/build_config.h" #include "build/debug.h" diff --git a/src/main/telemetry/ibus.c b/src/main/telemetry/ibus.c index 1105745385..38ddc390a5 100644 --- a/src/main/telemetry/ibus.c +++ b/src/main/telemetry/ibus.c @@ -28,7 +28,7 @@ #include "platform.h" -#if defined(TELEMETRY) && defined(TELEMETRY_IBUS) +#if defined(USE_TELEMETRY) && defined(USE_TELEMETRY_IBUS) #include "common/axis.h" diff --git a/src/main/telemetry/ibus_shared.c b/src/main/telemetry/ibus_shared.c index 5010f8a180..5d3e7c6634 100644 --- a/src/main/telemetry/ibus_shared.c +++ b/src/main/telemetry/ibus_shared.c @@ -36,7 +36,7 @@ static uint16_t calculateChecksum(const uint8_t *ibusPacket, size_t packetLength); -#if defined(TELEMETRY) && defined(TELEMETRY_IBUS) +#if defined(USE_TELEMETRY) && defined(USE_TELEMETRY_IBUS) #include "config/parameter_group.h" #include "config/parameter_group_ids.h" diff --git a/src/main/telemetry/ibus_shared.h b/src/main/telemetry/ibus_shared.h index 9c25aaff4f..f9d0a83384 100644 --- a/src/main/telemetry/ibus_shared.h +++ b/src/main/telemetry/ibus_shared.h @@ -30,7 +30,7 @@ #define IBUS_CHECKSUM_SIZE (2) -#if defined(TELEMETRY) && defined(TELEMETRY_IBUS) +#if defined(USE_TELEMETRY) && defined(USE_TELEMETRY_IBUS) uint8_t respondToIbusRequest(uint8_t const * const ibusPacket); void initSharedIbusTelemetry(serialPort_t * port); diff --git a/src/main/telemetry/jetiexbus.c b/src/main/telemetry/jetiexbus.c index dc2dc114f9..771275dc46 100644 --- a/src/main/telemetry/jetiexbus.c +++ b/src/main/telemetry/jetiexbus.c @@ -22,8 +22,8 @@ #include "platform.h" -#ifdef SERIAL_RX -#ifdef TELEMETRY +#ifdef USE_SERIAL_RX +#ifdef USE_TELEMETRY #include "build/build_config.h" #include "build/debug.h" diff --git a/src/main/telemetry/ltm.c b/src/main/telemetry/ltm.c index f8502b341a..dddbd4e1e1 100644 --- a/src/main/telemetry/ltm.c +++ b/src/main/telemetry/ltm.c @@ -33,7 +33,7 @@ #include "platform.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "build/build_config.h" diff --git a/src/main/telemetry/mavlink.c b/src/main/telemetry/mavlink.c index 0626ced8b1..b69c01adaa 100755 --- a/src/main/telemetry/mavlink.c +++ b/src/main/telemetry/mavlink.c @@ -26,7 +26,7 @@ #include "platform.h" -#if defined(TELEMETRY) && defined(TELEMETRY_MAVLINK) +#if defined(USE_TELEMETRY) && defined(USE_TELEMETRY_MAVLINK) #include "common/maths.h" #include "common/axis.h" diff --git a/src/main/telemetry/smartport.c b/src/main/telemetry/smartport.c index 0ba66be849..a04b4900d7 100644 --- a/src/main/telemetry/smartport.c +++ b/src/main/telemetry/smartport.c @@ -9,7 +9,7 @@ #include "platform.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "common/axis.h" #include "common/color.h" diff --git a/src/main/telemetry/srxl.c b/src/main/telemetry/srxl.c index b5c6d71b50..44597c5f04 100644 --- a/src/main/telemetry/srxl.c +++ b/src/main/telemetry/srxl.c @@ -21,7 +21,7 @@ #include "platform.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "build/version.h" diff --git a/src/main/telemetry/telemetry.c b/src/main/telemetry/telemetry.c index bd0b354b7f..dbf565942e 100644 --- a/src/main/telemetry/telemetry.c +++ b/src/main/telemetry/telemetry.c @@ -21,7 +21,7 @@ #include "platform.h" -#ifdef TELEMETRY +#ifdef USE_TELEMETRY #include "common/utils.h" @@ -73,31 +73,31 @@ PG_RESET_TEMPLATE(telemetryConfig_t, telemetryConfig, void telemetryInit(void) { -#ifdef TELEMETRY_FRSKY +#ifdef USE_TELEMETRY_FRSKY initFrSkyTelemetry(); #endif -#ifdef TELEMETRY_HOTT +#ifdef USE_TELEMETRY_HOTT initHoTTTelemetry(); #endif -#ifdef TELEMETRY_SMARTPORT +#ifdef USE_TELEMETRY_SMARTPORT initSmartPortTelemetry(); #endif -#ifdef TELEMETRY_LTM +#ifdef USE_TELEMETRY_LTM initLtmTelemetry(); #endif -#ifdef TELEMETRY_JETIEXBUS +#ifdef USE_TELEMETRY_JETIEXBUS initJetiExBusTelemetry(); #endif -#ifdef TELEMETRY_MAVLINK +#ifdef USE_TELEMETRY_MAVLINK initMAVLinkTelemetry(); #endif -#ifdef TELEMETRY_CRSF +#ifdef USE_TELEMETRY_CRSF initCrsfTelemetry(); #endif -#ifdef TELEMETRY_SRXL +#ifdef USE_TELEMETRY_SRXL initSrxlTelemetry(); #endif -#ifdef TELEMETRY_IBUS +#ifdef USE_TELEMETRY_IBUS initIbusTelemetry(); #endif #if defined(USE_MSP_OVER_TELEMETRY) @@ -127,7 +127,7 @@ bool telemetryCheckRxPortShared(const serialPortConfig_t *portConfig) if (portConfig->functionMask & FUNCTION_RX_SERIAL && portConfig->functionMask & TELEMETRY_SHAREABLE_PORT_FUNCTIONS_MASK) { return true; } -#ifdef TELEMETRY_IBUS +#ifdef USE_TELEMETRY_IBUS if ( portConfig->functionMask & FUNCTION_TELEMETRY_IBUS && portConfig->functionMask & FUNCTION_RX_SERIAL && rxConfig()->serialrx_provider == SERIALRX_IBUS) { @@ -142,66 +142,66 @@ serialPort_t *telemetrySharedPort = NULL; void telemetryCheckState(void) { -#ifdef TELEMETRY_FRSKY +#ifdef USE_TELEMETRY_FRSKY checkFrSkyTelemetryState(); #endif -#ifdef TELEMETRY_HOTT +#ifdef USE_TELEMETRY_HOTT checkHoTTTelemetryState(); #endif -#ifdef TELEMETRY_SMARTPORT +#ifdef USE_TELEMETRY_SMARTPORT checkSmartPortTelemetryState(); #endif -#ifdef TELEMETRY_LTM +#ifdef USE_TELEMETRY_LTM checkLtmTelemetryState(); #endif -#ifdef TELEMETRY_JETIEXBUS +#ifdef USE_TELEMETRY_JETIEXBUS checkJetiExBusTelemetryState(); #endif -#ifdef TELEMETRY_MAVLINK +#ifdef USE_TELEMETRY_MAVLINK checkMAVLinkTelemetryState(); #endif -#ifdef TELEMETRY_CRSF +#ifdef USE_TELEMETRY_CRSF checkCrsfTelemetryState(); #endif -#ifdef TELEMETRY_SRXL +#ifdef USE_TELEMETRY_SRXL checkSrxlTelemetryState(); #endif -#ifdef TELEMETRY_IBUS +#ifdef USE_TELEMETRY_IBUS checkIbusTelemetryState(); #endif } void telemetryProcess(uint32_t currentTime) { -#ifdef TELEMETRY_FRSKY +#ifdef USE_TELEMETRY_FRSKY handleFrSkyTelemetry(currentTime); #else UNUSED(currentTime); #endif -#ifdef TELEMETRY_HOTT +#ifdef USE_TELEMETRY_HOTT handleHoTTTelemetry(currentTime); #else UNUSED(currentTime); #endif -#ifdef TELEMETRY_SMARTPORT +#ifdef USE_TELEMETRY_SMARTPORT handleSmartPortTelemetry(); #endif -#ifdef TELEMETRY_LTM +#ifdef USE_TELEMETRY_LTM handleLtmTelemetry(); #endif -#ifdef TELEMETRY_JETIEXBUS +#ifdef USE_TELEMETRY_JETIEXBUS handleJetiExBusTelemetry(); #endif -#ifdef TELEMETRY_MAVLINK +#ifdef USE_TELEMETRY_MAVLINK handleMAVLinkTelemetry(); #endif -#ifdef TELEMETRY_CRSF +#ifdef USE_TELEMETRY_CRSF handleCrsfTelemetry(currentTime); #endif -#ifdef TELEMETRY_SRXL +#ifdef USE_TELEMETRY_SRXL handleSrxlTelemetry(currentTime); #endif -#ifdef TELEMETRY_IBUS +#ifdef USE_TELEMETRY_IBUS handleIbusTelemetry(); #endif } diff --git a/src/test/unit/platform.h b/src/test/unit/platform.h index 3fabf8a1d9..e411a6d0f3 100644 --- a/src/test/unit/platform.h +++ b/src/test/unit/platform.h @@ -30,8 +30,8 @@ #define USE_BARO #define USE_GPS #define USE_DASHBOARD -#define TELEMETRY -#define LED_STRIP +#define USE_TELEMETRY +#define USE_LED_STRIP #define USE_SERVOS #define TRANSPONDER diff --git a/src/test/unit/target.h b/src/test/unit/target.h index e68e10104b..591aa7ec43 100644 --- a/src/test/unit/target.h +++ b/src/test/unit/target.h @@ -29,7 +29,7 @@ #define USE_BARO #define USE_GPS #define USE_DASHBOARD -#define SERIAL_RX +#define USE_SERIAL_RX #define USE_RX_MSP #define USE_SERIALRX_CRSF // Team Black Sheep Crossfire protocol #define USE_SERIALRX_SPEKTRUM // DSM2 and DSMX protocol @@ -39,16 +39,16 @@ #define USE_SERIALRX_SUMD // Graupner Hott protocol #define USE_SERIALRX_SUMH // Graupner legacy protocol #define USE_SERIALRX_XBUS // JR -#define TELEMETRY -#define TELEMETRY_CRSF -#define TELEMETRY_FRSKY -#define TELEMETRY_HOTT -#define TELEMETRY_IBUS -#define TELEMETRY_JETIEXBUS -#define TELEMETRY_LTM -#define TELEMETRY_MAVLINK -#define TELEMETRY_SMARTPORT -#define LED_STRIP +#define USE_TELEMETRY +#define USE_TELEMETRY_CRSF +#define USE_TELEMETRY_FRSKY +#define USE_TELEMETRY_HOTT +#define USE_TELEMETRY_IBUS +#define USE_TELEMETRY_JETIEXBUS +#define USE_TELEMETRY_LTM +#define USE_TELEMETRY_MAVLINK +#define USE_TELEMETRY_SMARTPORT +#define USE_LED_STRIP #define USE_SERVOS #define TRANSPONDER #define USE_VCP