diff --git a/Makefile b/Makefile index d0bbda685..64cb3ff7a 100644 --- a/Makefile +++ b/Makefile @@ -910,6 +910,7 @@ ALIENFLIGHTF4_SRC = \ drivers/barometer_ms5611.c \ drivers/compass_ak8963.c \ drivers/compass_hmc5883l.c \ + drivers/display_ug2864hsweg01.c \ drivers/light_ws2811strip.c \ drivers/light_ws2811strip_stm32f4xx.c \ drivers/sdcard.c \ @@ -925,6 +926,7 @@ BLUEJAYF4_SRC = \ drivers/accgyro_spi_mpu6500.c \ drivers/accgyro_mpu6500.c \ drivers/barometer_ms5611.c \ + drivers/display_ug2864hsweg01.c \ drivers/sdcard.c \ drivers/sdcard_standard.c \ io/asyncfatfs/asyncfatfs.c \ @@ -938,6 +940,7 @@ REVO_SRC = \ drivers/accgyro_spi_mpu6000.c \ drivers/barometer_ms5611.c \ drivers/compass_hmc5883l.c \ + drivers/display_ug2864hsweg01.c \ $(HIGHEND_SRC) \ $(COMMON_SRC) \ $(VCPF4_SRC) @@ -946,6 +949,7 @@ KKNGF4_SRC = \ $(STM32F4xx_COMMON_SRC) \ drivers/accgyro_spi_mpu6000.c \ drivers/barometer_ms5611.c \ + drivers/display_ug2864hsweg01.c \ $(HIGHEND_SRC) \ $(COMMON_SRC) \ $(VCPF4_SRC) diff --git a/src/main/config/config.c b/src/main/config/config.c index d488f97da..c8bd370e1 100755 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -74,6 +74,10 @@ #include "config/config_profile.h" #include "config/config_master.h" +#ifndef DEFAULT_RX_FEATURE +#define DEFAULT_RX_FEATURE FEATURE_RX_PARALLEL_PWM +#endif + #define BRUSHED_MOTORS_PWM_RATE 16000 #ifdef STM32F4 #define BRUSHLESS_MOTORS_PWM_RATE 2000 @@ -408,25 +412,20 @@ static void resetConf(void) memset(&masterConfig, 0, sizeof(master_t)); setProfile(0); - masterConfig.version = EEPROM_CONF_VERSION; - masterConfig.mixerMode = MIXER_QUADX; featureClearAll(); -#ifdef CONFIG_RX_PPM - featureSet(FEATURE_RX_PPM); + featureSet(DEFAULT_RX_FEATURE | FEATURE_FAILSAFE | FEATURE_SUPEREXPO_RATES); +#ifdef DEFAULT_FEATURES + featureSet(DEFAULT_FEATURES); #endif -//#if defined(SPRACINGF3MINI) -// featureSet(FEATURE_DISPLAY); -//#endif - #ifdef BOARD_HAS_VOLTAGE_DIVIDER // only enable the VBAT feature by default if the board has a voltage divider otherwise // the user may see incorrect readings and unexpected issues with pin mappings may occur. featureSet(FEATURE_VBAT); #endif - featureSet(FEATURE_FAILSAFE); - featureSet(FEATURE_SUPEREXPO_RATES); + masterConfig.version = EEPROM_CONF_VERSION; + masterConfig.mixerMode = MIXER_QUADX; // global settings masterConfig.current_profile_index = 0; // default profile @@ -605,7 +604,6 @@ static void resetConf(void) #endif #ifdef SPRACINGF3 - featureSet(FEATURE_BLACKBOX); masterConfig.blackbox_device = 1; #ifdef TRANSPONDER static const uint8_t defaultTransponderData[6] = { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC }; // Note, this is NOT a valid transponder code, it's just for testing production hardware @@ -633,16 +631,6 @@ static void resetConf(void) masterConfig.escAndServoConfig.maxthrottle = 1980; masterConfig.batteryConfig.vbatmaxcellvoltage = 45; masterConfig.batteryConfig.vbatmincellvoltage = 30; - - featureSet(FEATURE_VBAT); - featureSet(FEATURE_FAILSAFE); -#endif - -#ifdef SPRACINGF3EVO - featureSet(FEATURE_TRANSPONDER); - featureSet(FEATURE_RSSI_ADC); - featureSet(FEATURE_CURRENT_METER); - featureSet(FEATURE_TELEMETRY); #endif #if defined(TARGET_CONFIG) @@ -650,8 +638,6 @@ static void resetConf(void) #endif #if defined(ALIENFLIGHT) - featureSet(FEATURE_RX_SERIAL); - featureSet(FEATURE_MOTOR_STOP); featureClear(FEATURE_ONESHOT125); #ifdef ALIENFLIGHTF3 masterConfig.serialConfig.portConfigs[2].functionMask = FUNCTION_RX_SERIAL; @@ -675,65 +661,24 @@ static void resetConf(void) currentControlRateProfile->rates[FD_YAW] = 20; parseRcChannels("TAER1234", &masterConfig.rxConfig); - // { 1.0f, -0.414178f, 1.0f, -1.0f }, // REAR_R - masterConfig.customMotorMixer[0].throttle = 1.0f; - masterConfig.customMotorMixer[0].roll = -0.414178f; - masterConfig.customMotorMixer[0].pitch = 1.0f; - masterConfig.customMotorMixer[0].yaw = -1.0f; - - // { 1.0f, -0.414178f, -1.0f, 1.0f }, // FRONT_R - masterConfig.customMotorMixer[1].throttle = 1.0f; - masterConfig.customMotorMixer[1].roll = -0.414178f; - masterConfig.customMotorMixer[1].pitch = -1.0f; - masterConfig.customMotorMixer[1].yaw = 1.0f; - - // { 1.0f, 0.414178f, 1.0f, 1.0f }, // REAR_L - masterConfig.customMotorMixer[2].throttle = 1.0f; - masterConfig.customMotorMixer[2].roll = 0.414178f; - masterConfig.customMotorMixer[2].pitch = 1.0f; - masterConfig.customMotorMixer[2].yaw = 1.0f; - - // { 1.0f, 0.414178f, -1.0f, -1.0f }, // FRONT_L - masterConfig.customMotorMixer[3].throttle = 1.0f; - masterConfig.customMotorMixer[3].roll = 0.414178f; - masterConfig.customMotorMixer[3].pitch = -1.0f; - masterConfig.customMotorMixer[3].yaw = -1.0f; - - // { 1.0f, -1.0f, -0.414178f, -1.0f }, // MIDFRONT_R - masterConfig.customMotorMixer[4].throttle = 1.0f; - masterConfig.customMotorMixer[4].roll = -1.0f; - masterConfig.customMotorMixer[4].pitch = -0.414178f; - masterConfig.customMotorMixer[4].yaw = -1.0f; - - // { 1.0f, 1.0f, -0.414178f, 1.0f }, // MIDFRONT_L - masterConfig.customMotorMixer[5].throttle = 1.0f; - masterConfig.customMotorMixer[5].roll = 1.0f; - masterConfig.customMotorMixer[5].pitch = -0.414178f; - masterConfig.customMotorMixer[5].yaw = 1.0f; - - // { 1.0f, -1.0f, 0.414178f, 1.0f }, // MIDREAR_R - masterConfig.customMotorMixer[6].throttle = 1.0f; - masterConfig.customMotorMixer[6].roll = -1.0f; - masterConfig.customMotorMixer[6].pitch = 0.414178f; - masterConfig.customMotorMixer[6].yaw = 1.0f; - - // { 1.0f, 1.0f, 0.414178f, -1.0f }, // MIDREAR_L - masterConfig.customMotorMixer[7].throttle = 1.0f; - masterConfig.customMotorMixer[7].roll = 1.0f; - masterConfig.customMotorMixer[7].pitch = 0.414178f; - masterConfig.customMotorMixer[7].yaw = -1.0f; + masterConfig.customMotorMixer[0] = (motorMixer_t){ 1.0f, -0.414178f, 1.0f, -1.0f }; // REAR_R + masterConfig.customMotorMixer[1] = (motorMixer_t){ 1.0f, -0.414178f, -1.0f, 1.0f }; // FRONT_R + masterConfig.customMotorMixer[2] = (motorMixer_t){ 1.0f, 0.414178f, 1.0f, 1.0f }; // REAR_L + masterConfig.customMotorMixer[3] = (motorMixer_t){ 1.0f, 0.414178f, -1.0f, -1.0f }; // FRONT_L + masterConfig.customMotorMixer[4] = (motorMixer_t){ 1.0f, -1.0f, -0.414178f, -1.0f }; // MIDFRONT_R + masterConfig.customMotorMixer[5] = (motorMixer_t){ 1.0f, 1.0f, -0.414178f, 1.0f }; // MIDFRONT_L + masterConfig.customMotorMixer[6] = (motorMixer_t){ 1.0f, -1.0f, 0.414178f, 1.0f }; // MIDREAR_R + masterConfig.customMotorMixer[7] = (motorMixer_t){ 1.0f, 1.0f, 0.414178f, -1.0f }; // MIDREAR_L#endif #endif - // alternative defaults settings for SINGULARITY target #if defined(SINGULARITY) - featureSet(FEATURE_BLACKBOX); + // alternative defaults settings for SINGULARITY target masterConfig.blackbox_device = 1; masterConfig.blackbox_rate_num = 1; masterConfig.blackbox_rate_denom = 1; masterConfig.batteryConfig.vbatscale = 77; - featureSet(FEATURE_RX_SERIAL); masterConfig.serialConfig.portConfigs[2].functionMask = FUNCTION_RX_SERIAL; #endif diff --git a/src/main/target/ALIENFLIGHTF3/target.h b/src/main/target/ALIENFLIGHTF3/target.h index f52a86ab0..0aa0e83e9 100644 --- a/src/main/target/ALIENFLIGHTF3/target.h +++ b/src/main/target/ALIENFLIGHTF3/target.h @@ -127,13 +127,11 @@ #define VBAT_ADC_GPIO_PIN GPIO_Pin_4 #define VBAT_ADC_CHANNEL ADC_Channel_1 -//#define BLACKBOX -#define SERIAL_RX -//#define GPS -//#define GTUNE -//#define DISPLAY -#define USE_SERVOS -#define USE_CLI +#undef BLACKBOX +#undef GPS +#undef DISPLAY +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM +#define DEFAULT_FEATURES (FEATURE_RX_SERIAL | FEATURE_MOTOR_STOP) #define SPEKTRUM_BIND // USART2, PA3 diff --git a/src/main/target/ALIENFLIGHTF4/target.h b/src/main/target/ALIENFLIGHTF4/target.h index c71c278d1..c3ec0a254 100644 --- a/src/main/target/ALIENFLIGHTF4/target.h +++ b/src/main/target/ALIENFLIGHTF4/target.h @@ -181,15 +181,6 @@ //#define WS2811_DMA_CHANNEL DMA1_Channel3 //#define WS2811_IRQ DMA1_Channel3_IRQn -#define BLACKBOX -//#define DISPLAY -#define GPS -//#define GTUNE -#define SERIAL_RX -#define TELEMETRY -#define USE_SERVOS -#define USE_CLI - #define SPEKTRUM_BIND // USART2, PA3 #define BIND_PORT GPIOA @@ -203,9 +194,10 @@ #define BINDPLUG_PORT GPIOB #define BINDPLUG_PIN PB2 -#define USE_SERIAL_4WAY_BLHELI_INTERFACE +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM +#define DEFAULT_FEATURES (FEATURE_RX_SERIAL | FEATURE_MOTOR_STOP) -#define USE_QUATERNION +#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTB 0xffff @@ -214,4 +206,4 @@ #define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8)) #define TIMER_APB1_PERIPHERALS (RCC_APB1Periph_TIM3 | RCC_APB1Periph_TIM4 | RCC_APB1Periph_TIM5 | RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC) -#define TIMER_APB2_PERIPHERALS (RCC_APB2Periph_TIM1 | RCC_APB2Periph_TIM8) \ No newline at end of file +#define TIMER_APB2_PERIPHERALS (RCC_APB2Periph_TIM1 | RCC_APB2Periph_TIM8) diff --git a/src/main/target/BLUEJAYF4/target.h b/src/main/target/BLUEJAYF4/target.h index 5ac722cff..9ac3a10cb 100644 --- a/src/main/target/BLUEJAYF4/target.h +++ b/src/main/target/BLUEJAYF4/target.h @@ -140,17 +140,9 @@ #define VBAT_ADC_PIN PC3 #define VBAT_ADC_CHANNEL ADC_Channel_13 -#define GPS -#define BLACKBOX -#define TELEMETRY -#define SERIAL_RX -#define AUTOTUNE -#define USE_QUAD_MIXER_ONLY -#define USE_CLI +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define USE_SERIAL_4WAY_BLHELI_INTERFACE -#define USE_QUATERNION - #define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff diff --git a/src/main/target/CC3D/target.h b/src/main/target/CC3D/target.h index 3b7d512cd..743a92c5b 100644 --- a/src/main/target/CC3D/target.h +++ b/src/main/target/CC3D/target.h @@ -30,11 +30,11 @@ #define MPU_INT_EXTI PA3 #define MPU6000_CS_GPIO GPIOA -#define MPU6000_CS_PIN GPIO_Pin_4 +#define MPU6000_CS_PIN PA4 #define MPU6000_SPI_INSTANCE SPI1 #define M25P16_CS_GPIO GPIOB -#define M25P16_CS_PIN GPIO_Pin_12 +#define M25P16_CS_PIN PB12 #define M25P16_SPI_INSTANCE SPI2 #define USE_FLASHFS @@ -117,13 +117,8 @@ #define USE_SERIAL_4WAY_BLHELI_INTERFACE #define DISPLAY -#define BLACKBOX -#define TELEMETRY -#define SERIAL_RX -#define USE_SERVOS -#define USE_CLI #define SONAR -//#define GPS +#undef GPS #undef BARO @@ -132,7 +127,6 @@ //#define SKIP_PID_LUXFLOAT #undef DISPLAY #undef SONAR -#undef GPS #endif // IO - from schematics diff --git a/src/main/target/CHEBUZZF3/target.h b/src/main/target/CHEBUZZF3/target.h index 92c5d1264..1afca2b86 100644 --- a/src/main/target/CHEBUZZF3/target.h +++ b/src/main/target/CHEBUZZF3/target.h @@ -117,15 +117,6 @@ #define EXTERNAL1_ADC_GPIO_PIN GPIO_Pin_3 #define EXTERNAL1_ADC_CHANNEL ADC_Channel_9 -#define GPS - -#define BLACKBOX -//#define GTUNE -#define TELEMETRY -#define SERIAL_RX -#define USE_SERVOS -#define USE_CLI - // IO - assuming 303 in 64pin package, TODO #define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTB 0xffff diff --git a/src/main/target/CJMCU/target.h b/src/main/target/CJMCU/target.h index c93c000d7..192a9568d 100644 --- a/src/main/target/CJMCU/target.h +++ b/src/main/target/CJMCU/target.h @@ -47,29 +47,22 @@ // #define SOFT_I2C_PB1011 // If SOFT_I2C is enabled above, need to define pinout as well (I2C1 = PB67, I2C2 = PB1011) // #define SOFT_I2C_PB67 -#define SERIAL_RX -//#define USE_SERVOS -#define USE_CLI - #define SPEKTRUM_BIND // USART2, PA3 #define BIND_PIN PA3 -// Since the CJMCU PCB has holes for 4 motors in each corner we can save same flash space by disabling support for other mixers. -#define USE_QUAD_MIXER_ONLY #if (FLASH_SIZE > 64) #define BLACKBOX +#define USE_SERVOS #else +// Since the CJMCU PCB has holes for 4 motors in each corner we can save same flash space by disabling support for other mixers. +#define USE_QUAD_MIXER_ONLY #define SKIP_TASK_STATISTICS #define SKIP_CLI_COMMAND_HELP #endif -//#undef USE_CLI -#define GTUNE -//#define BLACKBOX - // IO - assuming all IOs on 48pin package TODO #define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTB 0xffff diff --git a/src/main/target/COLIBRI_RACE/target.h b/src/main/target/COLIBRI_RACE/target.h index 7a9f379c5..4b3995988 100755 --- a/src/main/target/COLIBRI_RACE/target.h +++ b/src/main/target/COLIBRI_RACE/target.h @@ -21,6 +21,9 @@ #define BST_DEVICE_NAME "COLIBRI RACE" #define BST_DEVICE_NAME_LENGTH 12 +#ifdef CONFIG_FASTLOOP_PREFERRED_ACC +#undef CONFIG_FASTLOOP_PREFERRED_ACC +#endif #define CONFIG_FASTLOOP_PREFERRED_ACC 0 #define LED0 PC15 @@ -125,6 +128,7 @@ #define ADC_AHB_PERIPHERAL RCC_AHBPeriph_DMA1 #define ADC_DMA_CHANNEL DMA1_Channel1 +#define BOARD_HAS_VOLTAGE_DIVIDER #define VBAT_ADC_GPIO GPIOC #define VBAT_ADC_GPIO_PIN GPIO_Pin_0 #define VBAT_ADC_CHANNEL ADC_Channel_6 @@ -141,9 +145,6 @@ #define EXTERNAL1_ADC_GPIO_PIN GPIO_Pin_3 #define EXTERNAL1_ADC_CHANNEL ADC_Channel_9 -#define BLACKBOX -#define GPS -//#define GTUNE #define LED_STRIP #define USE_COLIBTI_RACE_LED_DEFAULT_CONFIG @@ -169,10 +170,7 @@ #define USE_MPU_DATA_READY_SIGNAL #define ENSURE_MPU_DATA_READY_IS_LOW -#define TELEMETRY -#define SERIAL_RX -#define USE_SERVOS -#define USE_CLI +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define USE_SERIAL_4WAY_BLHELI_INTERFACE diff --git a/src/main/target/DOGE/target.h b/src/main/target/DOGE/target.h index fc81cc676..471cf9a3a 100644 --- a/src/main/target/DOGE/target.h +++ b/src/main/target/DOGE/target.h @@ -157,9 +157,6 @@ #define EXTI_CALLBACK_HANDLER_COUNT 1 // MPU data ready -#define BLACKBOX -#define GPS -//#define GTUNE #define LED_STRIP // tqfp48 pin 16 @@ -177,10 +174,7 @@ #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC3 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH3_HANDLER -#define TELEMETRY -#define SERIAL_RX -#define USE_SERVOS -#define USE_CLI +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define SPEKTRUM_BIND // Use UART3 for speksat diff --git a/src/main/target/EUSTM32F103RC/target.h b/src/main/target/EUSTM32F103RC/target.h index 5faeef546..a9f1d84b0 100644 --- a/src/main/target/EUSTM32F103RC/target.h +++ b/src/main/target/EUSTM32F103RC/target.h @@ -109,17 +109,9 @@ #define EXTERNAL1_ADC_GPIO_PIN GPIO_Pin_5 #define EXTERNAL1_ADC_CHANNEL ADC_Channel_5 -#define GPS #define LED_STRIP #define LED_STRIP_TIMER TIM3 -#define BLACKBOX -#define GTUNE -#define TELEMETRY -#define SERIAL_RX -#define USE_SERVOS -#define USE_CLI - #define SPEKTRUM_BIND // USART2, PA3 #define BIND_PIN PA3 diff --git a/src/main/target/FURYF3/target.h b/src/main/target/FURYF3/target.h index 90a1a7ced..9d12cf632 100644 --- a/src/main/target/FURYF3/target.h +++ b/src/main/target/FURYF3/target.h @@ -19,6 +19,8 @@ #define TARGET_BOARD_IDENTIFIER "FURY" +#define CONFIG_FASTLOOP_PREFERRED_ACC 1 + #define MPU_INT_EXTI PC4 #define USE_EXTI #define CONFIG_PREFER_ACC_ON @@ -181,14 +183,9 @@ #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER -#define BLACKBOX -#define DISPLAY -#define GPS -#define SERIAL_RX -#define TELEMETRY -#define USE_SERVOS -#define USE_CLI #define SONAR +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM +#define DEFAULT_FEATURES FEATURE_BLACKBOX #define SPEKTRUM_BIND // USART3, diff --git a/src/main/target/IRCFUSIONF3/target.h b/src/main/target/IRCFUSIONF3/target.h index 0cb78333b..6e12a51c8 100644 --- a/src/main/target/IRCFUSIONF3/target.h +++ b/src/main/target/IRCFUSIONF3/target.h @@ -102,14 +102,6 @@ #define RSSI_ADC_GPIO_PIN GPIO_Pin_2 #define RSSI_ADC_CHANNEL ADC_Channel_12 -#define BLACKBOX -#define GPS -//#define GTUNE -#define SERIAL_RX -#define USE_SERVOS -#define TELEMETRY -#define USE_CLI - #define SPEKTRUM_BIND // USART3, #define BIND_PIN PB11 diff --git a/src/main/target/KKNGF4/target.h b/src/main/target/KKNGF4/target.h index 2098aa76e..2ada6f636 100644 --- a/src/main/target/KKNGF4/target.h +++ b/src/main/target/KKNGF4/target.h @@ -16,6 +16,7 @@ */ #pragma once + #define TARGET_BOARD_IDENTIFIER "REVO" //Call it a revo for now so it connects to RFC for testing. #define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8) #define CONFIG_SERIALRX_PROVIDER SERIALRX_SBUS @@ -139,15 +140,7 @@ #define CURRENT_METER_ADC_PIN PC3 #define CURRENT_METER_ADC_CHANNEL ADC_Channel_13 -#define GPS -#define BLACKBOX -#define TELEMETRY -#define SERIAL_RX -//#define GTUNE -#define USE_QUAD_MIXER_ONLY -#define USE_CLI - -#define USE_QUATERNION +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTB 0xffff diff --git a/src/main/target/LUX_RACE/target.h b/src/main/target/LUX_RACE/target.h index 7285d132c..1dac95694 100644 --- a/src/main/target/LUX_RACE/target.h +++ b/src/main/target/LUX_RACE/target.h @@ -31,7 +31,7 @@ #define MPU6500_CS_GPIO_CLK_PERIPHERAL RCC_AHBPeriph_GPIOA #define MPU6500_CS_GPIO GPIOA -#define MPU6500_CS_PIN GPIO_Pin_4 +#define MPU6500_CS_PIN PA4 #define MPU6500_SPI_INSTANCE SPI1 #define USE_SPI @@ -109,9 +109,6 @@ #define EXTERNAL1_ADC_GPIO_PIN GPIO_Pin_3 #define EXTERNAL1_ADC_CHANNEL ADC_Channel_9 -#define BLACKBOX -#define GPS -//#define GTUNE #define LED_STRIP #define LED_STRIP_TIMER TIM16 @@ -136,10 +133,7 @@ #define USE_MPU_DATA_READY_SIGNAL #define ENSURE_MPU_DATA_READY_IS_LOW -#define TELEMETRY -#define SERIAL_RX -#define USE_SERVOS -#define USE_CLI +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define SPEKTRUM_BIND // USART1, PC5 diff --git a/src/main/target/MOTOLAB/target.h b/src/main/target/MOTOLAB/target.h index ebdc2ea3b..6a1b6d537 100644 --- a/src/main/target/MOTOLAB/target.h +++ b/src/main/target/MOTOLAB/target.h @@ -113,13 +113,8 @@ //#define SENSORS_SET (SENSOR_ACC | SENSOR_BARO | SENSOR_GPS | SENSOR_MAG) #define SENSORS_SET (SENSOR_ACC) -#define TELEMETRY -#define BLACKBOX -#define SERIAL_RX -//#define GPS -//#define GTUNE +#undef GPS #define DISPLAY -#define USE_SERVOS #define USE_FLASHFS #define USE_FLASH_M25P16 diff --git a/src/main/target/NAZE/target.h b/src/main/target/NAZE/target.h index eab30f68d..87db8aefc 100644 --- a/src/main/target/NAZE/target.h +++ b/src/main/target/NAZE/target.h @@ -162,13 +162,7 @@ #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC6 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH6_HANDLER -//#define GPS -//#define GTUNE -#define BLACKBOX -#define TELEMETRY -#define SERIAL_RX -#define USE_SERVOS -#define USE_CLI +#undef GPS #define SPEKTRUM_BIND // USART2, PA3 @@ -182,6 +176,7 @@ #define TARGET_BOARD_IDENTIFIER "AWF1" // AlienFlight F1. #undef BOARD_HAS_VOLTAGE_DIVIDER #define ALIENFLIGHT +#define DEFAULT_FEATURES (FEATURE_RX_SERIAL | FEATURE_MOTOR_STOP) #define HARDWARE_BIND_PLUG diff --git a/src/main/target/NAZE32PRO/target.h b/src/main/target/NAZE32PRO/target.h index 43af4ac0a..4628f50f5 100644 --- a/src/main/target/NAZE32PRO/target.h +++ b/src/main/target/NAZE32PRO/target.h @@ -33,14 +33,6 @@ #define USE_I2C #define I2C_DEVICE (I2CDEV_1) -#define BLACKBOX -#define GPS -#define GTUNE -#define SERIAL_RX -#define TELEMETRY -#define USE_SERVOS -#define USE_CLI - #define SPEKTRUM_BIND // USART2, PA3 #define BIND_PIN PA3 diff --git a/src/main/target/OLIMEXINO/target.h b/src/main/target/OLIMEXINO/target.h index bfb027b71..ab3ed662a 100644 --- a/src/main/target/OLIMEXINO/target.h +++ b/src/main/target/OLIMEXINO/target.h @@ -98,16 +98,9 @@ #define EXTERNAL1_ADC_GPIO_PIN GPIO_Pin_5 #define EXTERNAL1_ADC_CHANNEL ADC_Channel_5 -#define GPS #define LED_STRIP #define LED_STRIP_TIMER TIM3 -#define TELEMETRY -#define SERIAL_RX -#define BLACKBOX -#define USE_SERVOS -#define USE_CLI - // IO - assuming all IOs on smt32f103rb LQFP64 package #define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTB 0xffff diff --git a/src/main/target/PORT103R/target.h b/src/main/target/PORT103R/target.h index 39f19bead..2c8c502b9 100644 --- a/src/main/target/PORT103R/target.h +++ b/src/main/target/PORT103R/target.h @@ -132,14 +132,6 @@ #define LED_STRIP #define LED_STRIP_TIMER TIM3 -#define BLACKBOX -#define GPS -#define GTUNE -#define SERIAL_RX -#define TELEMETRY -#define USE_SERVOS -#define USE_CLI - #define USE_SERIAL_4WAY_BLHELI_INTERFACE // IO - stm32f103RCT6 in 64pin package diff --git a/src/main/target/REVO/target.h b/src/main/target/REVO/target.h index 50d1cd197..1b940966d 100644 --- a/src/main/target/REVO/target.h +++ b/src/main/target/REVO/target.h @@ -16,7 +16,11 @@ */ #pragma once + #define TARGET_BOARD_IDENTIFIER "REVO" + +#define CONFIG_FASTLOOP_PREFERRED_ACC 1 + #define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8) #define CONFIG_SERIALRX_PROVIDER SERIALRX_SBUS #define CONFIG_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH @@ -121,23 +125,17 @@ //#define LED_STRIP //#define LED_STRIP_TIMER TIM5 -#define GPS -#define BLACKBOX -#define TELEMETRY -#define SERIAL_RX -//#define GTUNE -#define USE_SERVOS -#define USE_CLI -#define USE_SERIAL_4WAY_BLHELI_INTERFACE +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM +#define DEFAULT_FEATURES (FEATURE_BLACKBOX | FEATURE_ONESHOT125 | FEATURE_RX_SERIAL) -#define USE_QUATERNION +#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD 0xffff - #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(9)) +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(9)) #define TIMER_APB1_PERIPHERALS (RCC_APB1Periph_TIM2 | RCC_APB1Periph_TIM3 | RCC_APB1Periph_TIM5 | RCC_APB1Periph_TIM12 | RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC) #define TIMER_APB2_PERIPHERALS (RCC_APB2Periph_TIM8 | RCC_APB2Periph_TIM9) diff --git a/src/main/target/RMDO/target.h b/src/main/target/RMDO/target.h index 126096c14..8bc881d08 100644 --- a/src/main/target/RMDO/target.h +++ b/src/main/target/RMDO/target.h @@ -136,12 +136,7 @@ #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER -#define BLACKBOX -//#define GTUNE -#define TELEMETRY -#define SERIAL_RX -#define USE_SERVOS -#define USE_CLI +#undef GPS #define SPEKTRUM_BIND // USART3, diff --git a/src/main/target/SINGULARITY/target.h b/src/main/target/SINGULARITY/target.h index 622a1a70f..ae44083de 100644 --- a/src/main/target/SINGULARITY/target.h +++ b/src/main/target/SINGULARITY/target.h @@ -115,13 +115,8 @@ #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER -#define AUTOTUNE -#define BLACKBOX -#define TELEMETRY -#define SERIAL_RX -#define GPS -#define USE_SERVOS -#define USE_CLI +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM +#define DEFAULT_FEATURES (FEATURE_BLACKBOX | FEATURE_RX_SERIAL) #define SPEKTRUM_BIND // USART2, PA15 diff --git a/src/main/target/SPARKY/target.h b/src/main/target/SPARKY/target.h index cdba91f19..3010b3492 100644 --- a/src/main/target/SPARKY/target.h +++ b/src/main/target/SPARKY/target.h @@ -110,14 +110,7 @@ #define CURRENT_METER_ADC_GPIO_PIN GPIO_Pin_7 #define CURRENT_METER_ADC_CHANNEL ADC_Channel_4 -#define BLACKBOX -#define GPS -//#define GTUNE -#define DISPLAY -#define SERIAL_RX -#define TELEMETRY -#define USE_SERVOS -#define USE_CLI +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define LED_STRIP #if 1 diff --git a/src/main/target/SPRACINGF3/target.h b/src/main/target/SPRACINGF3/target.h index 34ff229bb..9ec1398f5 100644 --- a/src/main/target/SPRACINGF3/target.h +++ b/src/main/target/SPRACINGF3/target.h @@ -144,14 +144,8 @@ #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER -#define BLACKBOX -#define DISPLAY -#define GPS -//#define GTUNE -#define SERIAL_RX -#define TELEMETRY -#define USE_SERVOS -#define USE_CLI +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM +#define DEFAULT_FEATURES FEATURE_BLACKBOX #define SPEKTRUM_BIND // USART3, diff --git a/src/main/target/SPRACINGF3EVO/target.h b/src/main/target/SPRACINGF3EVO/target.h index 7f04d1bf5..d4e48ee7b 100755 --- a/src/main/target/SPRACINGF3EVO/target.h +++ b/src/main/target/SPRACINGF3EVO/target.h @@ -182,16 +182,10 @@ #define TRANSPONDER_DMA_TC_FLAG DMA1_FLAG_TC2 #define TRANSPONDER_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER -#define DEFAULT_RX_FEATURE FEATURE_RX_PPM - -#define GPS -#define BLACKBOX #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT -#define TELEMETRY -#define SERIAL_RX -#define DISPLAY -#define USE_SERVOS -#define USE_CLI + +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM +#define DEFAULT_FEATURES (FEATURE_TRANSPONDER | FEATURE_RSSI_ADC | FEATURE_CURRENT_METER | FEATURE_TELEMETRY) #define SPEKTRUM_BIND // USART3, diff --git a/src/main/target/SPRACINGF3MINI/target.h b/src/main/target/SPRACINGF3MINI/target.h index d3e55918d..ac19cda41 100644 --- a/src/main/target/SPRACINGF3MINI/target.h +++ b/src/main/target/SPRACINGF3MINI/target.h @@ -187,15 +187,8 @@ #define REDUCE_TRANSPONDER_CURRENT_DRAW_WHEN_USB_CABLE_PRESENT -#define GPS -#define BLACKBOX #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT -#define TELEMETRY -#define SERIAL_RX -#define AUTOTUNE -#define DISPLAY -#define USE_SERVOS -#define USE_CLI +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM #define BUTTONS #define BUTTON_A_PORT GPIOB diff --git a/src/main/target/STM32F3DISCOVERY/target.h b/src/main/target/STM32F3DISCOVERY/target.h index 9378a65f1..9803b7f40 100644 --- a/src/main/target/STM32F3DISCOVERY/target.h +++ b/src/main/target/STM32F3DISCOVERY/target.h @@ -135,15 +135,8 @@ #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC3 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH3_HANDLER -#define BLACKBOX -#define GPS -//#define GTUNE #define LED_STRIP #define LED_STRIP_TIMER TIM16 -#define TELEMETRY -#define SERIAL_RX -#define USE_SERVOS -#define USE_CLI #define USE_SERIAL_4WAY_BLHELI_INTERFACE diff --git a/src/main/target/common.h b/src/main/target/common.h index 6373874c1..a9d961e4d 100644 --- a/src/main/target/common.h +++ b/src/main/target/common.h @@ -17,12 +17,27 @@ #pragma once -#define CONFIG_FASTLOOP_PREFERRED_ACC 1 - #ifdef STM32F4 #define TASK_GYROPID_DESIRED_PERIOD 125 #define SCHEDULER_DELAY_LIMIT 10 #else #define TASK_GYROPID_DESIRED_PERIOD 1000 #define SCHEDULER_DELAY_LIMIT 100 -#endif \ No newline at end of file +#endif + +#define SERIAL_RX +#define USE_CLI + +#if (FLASH_SIZE > 64) +#define BLACKBOX +#define GPS +#define TELEMETRY +#define USE_SERVOS +#endif + +#if (FLASH_SIZE > 128) +#define DISPLAY +#else +#define SKIP_CLI_COMMAND_HELP +#define SKIP_RX_MSP +#endif