Skip to content

Commit

Permalink
Cleanup configs (betaflight#505)
Browse files Browse the repository at this point in the history
Cleanup vestigial defines from unified targets and fix defaults for ELRS AIO.
  • Loading branch information
ot0tot authored Jul 29, 2024
1 parent 68d4e30 commit bc5da0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 33 deletions.
13 changes: 1 addition & 12 deletions configs/BETAFPVF405/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@
TIMER_PIN_MAP( 9, PA10, 1, 0)



#define SPI2_TX_DMA_OPT 0
#define ADC2_DMA_OPT 1

#define MAG_I2C_INSTANCE (I2CDEV_2)
Expand All @@ -108,25 +106,16 @@

#define ADC_INSTANCE ADC2
#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
//TODO #define DSHOT_IDLE_VALUE 450
#define DEFAULT_DSHOT_BURST DSHOT_DMAR_ON
//TODO #define MOTOR_POLES 12
#define DEFAULT_DSHOT_BURST DSHOT_DMAR_AUTO
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
#define BEEPER_INVERTED
//TODO #define YAW_MOTORS_REVERSED ON
#define SDCARD_DETECT_INVERTED
#define USE_SDCARD_SPI
#define SDCARD_SPI_INSTANCE SPI2
#define SYSTEM_HSE_MHZ 8
//TODO #define VTX_BAND 5
//TODO #define VTX_CHANNEL 8
//TODO #define VTX_POWER 1
//TODO #define VTX_FREQ 5917
#define MAX7456_SPI_INSTANCE SPI3
#define DASHBOARD_I2C_INSTANCE (I2CDEV_2)
#define FLASH_SPI_INSTANCE SPI2
#define GYRO_1_SPI_INSTANCE SPI1
#define GYRO_1_ALIGN CW270_DEG
#define GYRO_1_ALIGN_YAW 2700
#define GYRO_2_SPI_INSTANCE SPI1
25 changes: 4 additions & 21 deletions configs/BETAFPVF405_ELRS/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
#define MOTOR4_PIN PA2
#define MOTOR5_PIN PC8
#define MOTOR6_PIN PA8
#define RX_PPM_PIN PB8
#define SONAR_TRIGGER_PIN PC9
#define SONAR_ECHO_PIN PA8
#define LED_STRIP_PIN PB6
#define UART1_TX_PIN PA9
#define UART3_TX_PIN PB10
Expand Down Expand Up @@ -92,44 +89,30 @@
TIMER_PIN_MAP( 4, PA3 , 1, 1) \
TIMER_PIN_MAP( 5, PA2 , 1, 0) \
TIMER_PIN_MAP( 6, PB6 , 1, 0) \
TIMER_PIN_MAP( 7, PA8 , 1, -1) \
TIMER_PIN_MAP( 8, PA9 , 1, 0) \
TIMER_PIN_MAP( 9, PA10, 1, 0)
TIMER_PIN_MAP( 7, PA8 , 1, -1)



#define SPI2_TX_DMA_OPT 0
#define ADC2_DMA_OPT 1

#define MAG_I2C_INSTANCE (I2CDEV_2)
#define BARO_SPI_INSTANCE SPI3
#define DEFAULT_BARO_DEVICE BARO_NONE

#define ADC_INSTANCE ADC2
#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
//TODO #define DSHOT_IDLE_VALUE 450
#define DEFAULT_DSHOT_BURST DSHOT_DMAR_ON
//TODO #define MOTOR_PWM_PROTOCOL DSHOT600
//TODO #define MOTOR_POLES 12
#define DEFAULT_DSHOT_BURST DSHOT_DMAR_OFF
#define MOTOR_PWM_PROTOCOL DSHOT300
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
#define BEEPER_INVERTED
//TODO #define YAW_MOTORS_REVERSED ON
#define SDCARD_DETECT_INVERTED
#define USE_SDCARD_SPI
#define SDCARD_SPI_INSTANCE SPI2
#define SYSTEM_HSE_MHZ 8
//TODO #define VTX_BAND 5
//TODO #define VTX_CHANNEL 8
//TODO #define VTX_POWER 1
//TODO #define VTX_FREQ 5917
#define MAX7456_SPI_INSTANCE SPI3
#define DASHBOARD_I2C_INSTANCE (I2CDEV_2)
#define FLASH_SPI_INSTANCE SPI2
#define GYRO_1_SPI_INSTANCE SPI1
#define GYRO_1_ALIGN CW270_DEG
#define GYRO_1_ALIGN_YAW 2700
#define GYRO_2_SPI_INSTANCE SPI1

#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
#define SERIALRX_UART SERIAL_PORT_USART3
#define SERIALRX_PROVIDER SERIALRX_CRSF

0 comments on commit bc5da0e

Please sign in to comment.