Skip to content

Commit

Permalink
FIX CONFIG: MATEKF405TE /MINI (#12492)
Browse files Browse the repository at this point in the history
* FIX CONFIG: MATEKF405TE /MINI

* changes as requested
  • Loading branch information
TheIsotopes committed Mar 10, 2023
1 parent 2efc895 commit 6d4921e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 36 deletions.
68 changes: 36 additions & 32 deletions src/config/MATEKF405TE/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,44 +83,48 @@
#define GYRO_1_CS_PIN PC14

#define TIMER_PIN_MAPPING \
TIMER_PIN_MAP( 0, PC9 , 2, 0) \
TIMER_PIN_MAP( 1, PC8 , 2, 0) \
TIMER_PIN_MAP( 2, PB15, 1, 1) \
TIMER_PIN_MAP( 3, PA8 , 1, 1) \
TIMER_PIN_MAP( 4, PB11, 1, 0) \
TIMER_PIN_MAP( 5, PB10, 1, 0) \
TIMER_PIN_MAP( 6, PB3 , 1, 0) \
TIMER_PIN_MAP( 7, PA15, 1, 0) \
TIMER_PIN_MAP( 8, PB14, 3, -1) \
TIMER_PIN_MAP( 9, PA6 , 2, -1) \
TIMER_PIN_MAP(10, PB6 , 1, 0) \
TIMER_PIN_MAP(11, PB1 , 2, 0) \
TIMER_PIN_MAP(12, PB9 , 2, -1) \
TIMER_PIN_MAP(13, PA3 , 3, -1) \
TIMER_PIN_MAP(14, PA2 , 2, 0)
TIMER_PIN_MAP( 0, MOTOR1_PIN, 2, 0) \
TIMER_PIN_MAP( 1, MOTOR2_PIN, 2, 0) \
TIMER_PIN_MAP( 2, MOTOR3_PIN, 1, 1) \
TIMER_PIN_MAP( 3, MOTOR4_PIN, 1, 1) \
TIMER_PIN_MAP( 4, MOTOR5_PIN, 1, 0) \
TIMER_PIN_MAP( 5, MOTOR6_PIN, 1, 0) \
TIMER_PIN_MAP( 6, MOTOR7_PIN, 1, 0) \
TIMER_PIN_MAP( 7, MOTOR8_PIN, 1, 0) \
TIMER_PIN_MAP( 8, SERVO1_PIN, 3, -1) \
TIMER_PIN_MAP( 9, SERVO2_PIN, 2, -1) \
TIMER_PIN_MAP(10, SERVO3_PIN, 1, 0) \
TIMER_PIN_MAP(11, LED_STRIP_PIN, 2, 0) \
TIMER_PIN_MAP(12, BEEPER_PIN, 2, -1) \
TIMER_PIN_MAP(13, RX_PPM_PIN, 3, -1) \
TIMER_PIN_MAP(14, UART2_TX_PIN, 2, 0)


#define ADC1_DMA_OPT 1
#define ADC1_DMA_OPT 1

//TODO #define MAG_BUSTYPE I2C
#define MAG_I2C_INSTANCE (I2CDEV_1)
#define MAG_I2C_INSTANCE (I2CDEV_1)
//TODO #define MAG_HARDWARE AUTO
#define USE_BARO
#define BARO_I2C_INSTANCE (I2CDEV_1)
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
#define DEFAULT_VOLTAGE_METER_SCALE 210
#define DEFAULT_CURRENT_METER_SCALE 150
#define BARO_I2C_INSTANCE (I2CDEV_1)
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
#define DEFAULT_VOLTAGE_METER_SCALE 210
#define DEFAULT_CURRENT_METER_SCALE 150
#define BEEPER_INVERTED
#define SYSTEM_HSE_MHZ 8
#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
#define MAX7456_SPI_INSTANCE SPI1
#define PINIO1_BOX 40
#define PINIO2_BOX 41
#define FLASH_SPI_INSTANCE SPI2
#define SYSTEM_HSE_MHZ 8
#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
#define MAX7456_SPI_INSTANCE SPI1
#define USE_SDCARD_SPI
#define SDCARD_SPI_INSTANCE SPI2

#define USE_SPI_GYRO
#define GYRO_1_SPI_INSTANCE SPI1
#define GYRO_1_ALIGN CW270_DEG_FLIP
#define GYRO_1_ALIGN_PITCH 1800
#define GYRO_1_ALIGN_YAW 2700
//TODO #define SERIALRX_PROVIDER CRSF
#define GYRO_1_SPI_INSTANCE SPI1
#define GYRO_1_ALIGN CW270_DEG_FLIP
#define GYRO_1_ALIGN_PITCH 1800
#define GYRO_1_ALIGN_YAW 2700

#define SERIALRX_UART SERIAL_PORT_USART2
#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
#define SERIALRX_PROVIDER SERIALRX_CRSF
5 changes: 1 addition & 4 deletions src/config/MATEKF405TEMINI/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,10 @@
#define LED1_PIN PA13
#define SPI1_SCK_PIN PA5
#define SPI2_SCK_PIN PB13
#define SPI3_SCK_PIN NONE
#define SPI1_SDI_PIN PB4
#define SPI2_SDI_PIN PC2
#define SPI3_SDI_PIN NONE
#define SPI1_SDO_PIN PA7
#define SPI2_SDO_PIN PC3
#define SPI3_SDO_PIN NONE
#define ADC_VBAT_PIN PC4
#define ADC_RSSI_PIN PB0
#define ADC_CURR_PIN PC5
Expand Down Expand Up @@ -102,7 +99,6 @@
TIMER_PIN_MAP(13, RX_PPM_PIN, 3, -1) \
TIMER_PIN_MAP(14, UART2_TX_PIN, 2, 0)


#define ADC1_DMA_OPT 1

//TODO #define MAG_BUSTYPE I2C
Expand All @@ -128,5 +124,6 @@
#define GYRO_1_ALIGN_PITCH 1800
#define GYRO_1_ALIGN_YAW 2700

#define SERIALRX_UART SERIAL_PORT_USART2
#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
#define SERIALRX_PROVIDER SERIALRX_CRSF

0 comments on commit 6d4921e

Please sign in to comment.