Skip to content

Commit

Permalink
Add new targets
Browse files Browse the repository at this point in the history
tbs, tmotor, silentforce and zex borey
  • Loading branch information
AlkaMotors committed Jan 15, 2025
1 parent b35cbd1 commit 19051c2
Showing 1 changed file with 91 additions and 7 deletions.
98 changes: 91 additions & 7 deletions Inc/targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,47 @@
#define FIRMWARE_NAME "L431 TEST"
#define DEAD_TIME 80
#define HARDWARE_GROUP_L4_A
#define COMP_ORDER_L4_A_045
#define TARGET_VOLTAGE_DIVIDER 260
#define USE_SERIAL_TELEMETRY
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#endif

#ifdef TMOTOR_L431
#define FILE_NAME "TMOTOR_L431"
#define FIRMWARE_NAME "TMOTOR_L431"
#define DEAD_TIME 80
#define HARDWARE_GROUP_L4_A
#define COMP_ORDER_L4_A_540
#define TARGET_VOLTAGE_DIVIDER 260
#define USE_SERIAL_TELEMETRY
#endif

#ifdef TBS_12S_L431
#define FILE_NAME "TBS_12S_L431"
#define FIRMWARE_NAME "L431 TBS "
#define DEAD_TIME 80
#define HARDWARE_GROUP_L4_A
#define COMP_ORDER_L4_A_045
#define TARGET_VOLTAGE_DIVIDER 210
#define USE_SERIAL_TELEMETRY
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#define MILLIVOLT_PER_AMP 25
#endif

#ifdef REF_L431_CAN
#define FILE_NAME "REF_L431_CAN"
#define FIRMWARE_NAME "L431 CAN"
#define DEAD_TIME 80
#define HARDWARE_GROUP_L4_A
#define COMP_ORDER_L4_A_045
#define TARGET_VOLTAGE_DIVIDER 260
#define USE_SERIAL_TELEMETRY
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#define DRONECAN_SUPPORT 1
#endif

#ifdef SEQURE_TEST_E230
Expand Down Expand Up @@ -259,7 +298,8 @@
#define PA6_VOLTAGE
#define USE_SERIAL_TELEMETRY
#define LED_ON_PA15
#define SLOW_RAMP_DOWN
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#endif

#ifdef GD32DEV_B_E230
Expand Down Expand Up @@ -418,6 +458,16 @@
#define ADC_CHANNEL_VOLTAGE ADC_CHANNEL_6
#endif

#ifdef SILENTFORCE_50_F421
#define FIRMWARE_NAME "Silent-50 "
#define FILE_NAME "SILENTFORCE_50_F421"
#define DEAD_TIME 25
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_045
#define USE_SERIAL_TELEMETRY
#define MILLIVOLT_PER_AMP 20
#endif

#ifdef HDZ_ESC_1R0_F421
#define FIRMWARE_NAME "HDZ_1R0 F4"
#define FILE_NAME "HDZ_ESC_1R0_F421"
Expand Down Expand Up @@ -610,7 +660,6 @@
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_450
#define USE_SERIAL_TELEMETRY

#endif

#ifdef HAKRC_G23_F421
Expand Down Expand Up @@ -702,6 +751,16 @@
#define USE_SERIAL_TELEMETRY
#endif

#ifdef TBS_MINI_F421
#define FIRMWARE_NAME "TBS Mini"
#define FILE_NAME "TBS_MINI_F421"
#define DEAD_TIME 120
#define HARDWARE_GROUP_AT_045
#define HARDWARE_GROUP_AT_B
#define USE_INVERTED_HIGH
#define TARGET_MIN_BEMF_COUNTS 2
#endif

#ifdef TBS_12S_F421
#define FIRMWARE_NAME "TBS 12S"
#define FILE_NAME "TBS_12S_F421"
Expand Down Expand Up @@ -1047,14 +1106,11 @@
#define FIRMWARE_NAME "F4A Zerodrag"
#define FILE_NAME "F4A_ZERODRAG_F421"
#define DEAD_TIME 75
#define HARDWARE_GROUP_AT_540
#define HARDWARE_GROUP_AT_054
#define HARDWARE_GROUP_AT_B
#define USE_SERIAL_TELEMETRY
#define USE_PA14_TELEMETRY
#define PA6_NTC_ONLY
#endif


#ifdef GEPRC_4IN1_F421
#define FIRMWARE_NAME "Geprc 4in1 "
#define FILE_NAME "GEPRC_4IN1_F421"
Expand All @@ -1064,7 +1120,6 @@
#define USE_SERIAL_TELEMETRY
#endif


#ifdef ORQA_F421
#define FIRMWARE_NAME "ORQA "
#define FILE_NAME "ORQA_F421"
Expand All @@ -1075,6 +1130,16 @@
#endif


#ifdef ZEX_BOREY_F421
#define FIRMWARE_NAME "Zex Borey F4"
#define FILE_NAME "ZEX_BOREY_F421"
#define DEAD_TIME 80
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_450
#define USE_SERIAL_TELEMETRY
#endif


/*****************************************************AT32F415 targets ************************************************/

#ifdef PB450_F051
Expand Down Expand Up @@ -1530,6 +1595,17 @@
#define SIXTY_FOUR_KB_MEMORY
#endif

#ifdef TMOTOR_F60A_G071
#define FILE_NAME "TMOTOR_F60A_G071"
#define FIRMWARE_NAME "F60A Mini G0"
#define DEAD_TIME 60
#define MILLIVOLT_PER_AMP 20
#define CURRENT_OFFSET 0
#define HARDWARE_GROUP_G0_A
#define USE_SERIAL_TELEMETRY
#define SIXTY_FOUR_KB_MEMORY
#endif

#ifdef ST_G0_03_N_G071
#define FILE_NAME "ST_G0_03_N_G071"
#define FIRMWARE_NAME "ST_G0_03_N "
Expand Down Expand Up @@ -3356,10 +3432,18 @@
#define PHASE_C_GPIO_HIGH LL_GPIO_PIN_8
#define PHASE_C_GPIO_PORT_HIGH GPIOA

#ifdef COMP_ORDER_L4_A_045
#define USE_COMP_1
#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO3 // pa0
#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO4 // pa4
#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO5 // pa5
#endif

#ifdef COMP_ORDER_L4_A_540
#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO5 // pa5 /// THIS CONFIG FOR T-MOTOR
#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO4 // pa4
#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO3 // pa0
#endif

#define COMMON_COMP LL_COMP_INPUT_PLUS_IO3

Expand Down

0 comments on commit 19051c2

Please sign in to comment.