Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reintroduce input capture filter #77

Merged
merged 7 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 208 additions & 5 deletions Inc/targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
#endif
///
#ifdef REF_G431
#define FIRMWARE_NAME "Ref G431 "
#define FIRMWARE_NAME "Ref G431"
#define FILE_NAME "REF_G431"
#define DEAD_TIME 80
#define HARDWARE_GROUP_G4_A
Expand All @@ -138,8 +138,18 @@
// #define USE_SERIAL_TELEMETRY
#endif

#ifdef PROTONDRIVE_G431
#define FIRMWARE_NAME "PROTONDRIVE "
#define FILE_NAME "PROTONDRIVE_G431"
#define DEAD_TIME 100
#define HARDWARE_GROUP_G4_B
#define TARGET_STALL_PROTECTION_INTERVAL 20000
// #define PA6_VOLTAGE
// #define USE_SERIAL_TELEMETRY
#endif

#ifdef GD32DEV_A_E230
#define FIRMWARE_NAME "GD32 Dev A "
#define FIRMWARE_NAME "GD32 Dev A"
#define FILE_NAME "GD32DEV_A_E230"
#define DEAD_TIME 40
#define HARDWARE_GROUP_GD_A
Expand Down Expand Up @@ -216,7 +226,7 @@
#endif

#ifdef AIRBEE_F421
#define FIRMWARE_NAME "AIRBEE F4 "
#define FIRMWARE_NAME "AIRBEE F4"
#define FILE_NAME "AIRBEE_F421"
#define DEAD_TIME 22
#define HARDWARE_GROUP_AT_045
Expand Down Expand Up @@ -246,6 +256,28 @@
// #define PA6_NTC_ONLY
#endif

#ifdef FLYWOO_F4A_F421
#define FIRMWARE_NAME "FLYWOO_F4A "
#define FILE_NAME "FLYWOO_F4A_F421"
#define DEAD_TIME 75
#define HARDWARE_GROUP_AT_540
#define HARDWARE_GROUP_AT_E
#define USE_SERIAL_TELEMETRY
#define USE_PA14_TELEMETRY
#define PA6_NTC_ONLY
#endif

#ifdef FLYWOO_F421
#define FIRMWARE_NAME "FLYWOO_F421 "
#define FILE_NAME "FLYWOO_F421"
#define DEAD_TIME 60
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_045
#define USE_SERIAL_TELEMETRY
#define ADC_CHANNEL_CURRENT ADC_CHANNEL_3
#define ADC_CHANNEL_VOLTAGE ADC_CHANNEL_6
#endif

#ifdef F4A_4IN1_F421
#define FIRMWARE_NAME "F4A 4in1 "
#define FILE_NAME "F4A_4IN1_F421"
Expand Down Expand Up @@ -541,7 +573,7 @@
#endif

#ifdef AT32DEV_F415
#define FIRMWARE_NAME "AT32F415 "
#define FIRMWARE_NAME "AT32F415"
#define FILE_NAME "AT32DEV_F415"
#define DEAD_TIME 100
#define HARDWARE_GROUP_AT_D
Expand All @@ -550,7 +582,7 @@
#endif

#ifdef DAKEFPV_35A_F415
#define FIRMWARE_NAME "DakeFPV 35A "
#define FIRMWARE_NAME "DakeFPV 35A"
#define FILE_NAME "DAKEFPV_35A_F415" // DISABLE_BUILD
#define DEAD_TIME 20
#define HARDWARE_GROUP_AT_D
Expand Down Expand Up @@ -648,6 +680,15 @@
#define USE_SERIAL_TELEMETRY
#endif

#ifdef SKYSTARS_KM55_V2_F421
#define FIRMWARE_NAME "KM55 F4 "
#define FILE_NAME "SKYSTARS_KM55_V2_F421"
#define DEAD_TIME 60
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_045
#define USE_SERIAL_TELEMETRY
#endif

#ifdef SKYSTARS_AM60_THRUSTER_F421
#define FIRMWARE_NAME "F421 ROV "
#define FILE_NAME "SKYSTARS_AM60_THRUSTER_F421"
Expand Down Expand Up @@ -709,6 +750,47 @@
#define USE_SERIAL_TELEMETRY
#endif

#ifdef AORC_K_A_F421
#define FIRMWARE_NAME "AORC_K_F421"
#define FILE_NAME "AORC_K_A_F421"
#define DEAD_TIME 80
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_540
#define USE_SERIAL_TELEMETRY
#define USE_LED_STRIP
#define WS2812_PIN GPIO_PINS_8
#endif

#ifdef AORC_G_A_F421
#define FIRMWARE_NAME "AORC_G_F421"
#define FILE_NAME "AORC_G_A_F421"
#define DEAD_TIME 80
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_450
#define USE_SERIAL_TELEMETRY
#endif

#ifdef BAYCKRC_S_55A_F421
#define HARDWARE_GROUP_AT_C
#define FIRMWARE_NAME "BAYCKRC S55A"
#define FILE_NAME "BAYCKRC_S_55A_F421"
#define DEAD_TIME 60
#define HARDWARE_GROUP_AT_540
#define USE_SERIAL_TELEMETRY
#endif

#ifdef F4A_ZERODRAG_F421
#define FIRMWARE_NAME "F4A Zerodrag"
#define FILE_NAME "F4A_ZERODRAG_F421"
#define DEAD_TIME 75
#define HARDWARE_GROUP_AT_540
#define HARDWARE_GROUP_AT_B
#define USE_SERIAL_TELEMETRY
#define USE_PA14_TELEMETRY
#define PA6_NTC_ONLY
#endif


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

#ifdef PB450_F051
Expand Down Expand Up @@ -738,6 +820,30 @@
#define HARDWARE_GROUP_F0_405
#endif

#ifdef ASCENT_TEST_F051
#define FIRMWARE_NAME "Sequre F0 "
#define FILE_NAME "ASCENT_TEST_F051"
#define DEAD_TIME 80
#define HARDWARE_GROUP_F0_C
#define USE_SERIAL_TELEMETRY
#define VOLTAGE_ADC_CHANNEL LL_ADC_CHANNEL_6
#define VOLTAGE_ADC_PIN LL_GPIO_PIN_6
#define CURRENT_ADC_CHANNEL LL_ADC_CHANNEL_3
#define CURRENT_ADC_PIN LL_GPIO_PIN_3
#define MILLIVOLT_PER_AMP 25
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#endif

#ifdef DM_VISHNU32_F051
#define FILE_NAME "DM_VISHNU32_F051"
#define FIRMWARE_NAME "DM_VISHNU32 "
#define DEAD_TIME 45
#define HARDWARE_GROUP_F0_A
#define TARGET_VOLTAGE_DIVIDER 65
#define USE_SERIAL_TELEMETRY
#endif

#ifdef FD6288_F051
#define FILE_NAME "FD6288_F051"
#define FIRMWARE_NAME "FD6288_PA2 "
Expand Down Expand Up @@ -1058,6 +1164,18 @@
/******************************* G071 Targets
* *********************************/

#ifdef RRIOT_G071
#define FILE_NAME "RRIOT_G071"
#define FIRMWARE_NAME "RRIOT G071"
#define DEAD_TIME 45
#define MILLIVOLT_PER_AMP 15
#define CURRENT_OFFSET 0
#define HARDWARE_GROUP_G0_K
#define USE_SERIAL_TELEMETRY
#define SIXTY_FOUR_KB_MEMORY
#endif


#ifdef GEN_64K_G071
#define FILE_NAME "GEN_64K_G071"
#define FIRMWARE_NAME "G071 64kESC "
Expand Down Expand Up @@ -2185,6 +2303,41 @@

#endif

#ifdef HARDWARE_GROUP_G0_K

#define MCU_G071
#define USE_TIMER_3_CHANNEL_1
#define INPUT_PIN LL_GPIO_PIN_4
#define INPUT_PIN_PORT GPIOB
#define IC_TIMER_CHANNEL LL_TIM_CHANNEL_CH1
#define IC_TIMER_REGISTER TIM3
#define IC_TIMER_POINTER htim3

#define INPUT_DMA_CHANNEL LL_DMA_CHANNEL_1
#define DMA_HANDLE_TYPE_DEF hdma_tim3_ch1
#define IC_DMA_IRQ_NAME DMA1_Channel1_IRQn

#define PHASE_A_GPIO_LOW LL_GPIO_PIN_1
#define PHASE_A_GPIO_PORT_LOW GPIOB
#define PHASE_A_GPIO_HIGH LL_GPIO_PIN_10
#define PHASE_A_GPIO_PORT_HIGH GPIOA

#define PHASE_B_GPIO_LOW LL_GPIO_PIN_0
#define PHASE_B_GPIO_PORT_LOW GPIOB
#define PHASE_B_GPIO_HIGH LL_GPIO_PIN_9
#define PHASE_B_GPIO_PORT_HIGH GPIOA

#define PHASE_C_GPIO_LOW LL_GPIO_PIN_7
#define PHASE_C_GPIO_PORT_LOW GPIOA
#define PHASE_C_GPIO_HIGH LL_GPIO_PIN_8
#define PHASE_C_GPIO_PORT_HIGH GPIOA

#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO3 // pa2
#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO1 // pb3
#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO2 // pb7

#endif

#ifdef HARDWARE_GROUP_G4_A

#define MCU_G431
Expand Down Expand Up @@ -2235,6 +2388,56 @@

#endif

#ifdef HARDWARE_GROUP_G4_B

#define MCU_G431
#define USE_TIMER_15_CHANNEL_1
#define INPUT_PIN LL_GPIO_PIN_2
#define INPUT_PIN_PORT GPIOA
#define IC_TIMER_CHANNEL LL_TIM_CHANNEL_CH1
#define IC_TIMER_REGISTER TIM15
#define IC_TIMER_POINTER htim15

#define INPUT_DMA_CHANNEL LL_DMA_CHANNEL_1
#define DMA_HANDLE_TYPE_DEF hdma_tim15_ch1
#define IC_DMA_IRQ_NAME DMA1_Channel1_IRQn

#define PHASE_A_GPIO_LOW LL_GPIO_PIN_1
#define PHASE_A_GPIO_PORT_LOW GPIOB
#define PHASE_A_GPIO_HIGH LL_GPIO_PIN_10
#define PHASE_A_GPIO_PORT_HIGH GPIOA

#define PHASE_B_GPIO_LOW LL_GPIO_PIN_0
#define PHASE_B_GPIO_PORT_LOW GPIOB
#define PHASE_B_GPIO_HIGH LL_GPIO_PIN_9
#define PHASE_B_GPIO_PORT_HIGH GPIOA

#define PHASE_C_GPIO_LOW LL_GPIO_PIN_7
#define PHASE_C_GPIO_PORT_LOW GPIOA
#define PHASE_C_GPIO_HIGH LL_GPIO_PIN_8
#define PHASE_C_GPIO_PORT_HIGH GPIOA

#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO1 //
#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO1 //
#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO2 //

#define PHASE_A_EXTI_LINE LL_EXTI_LINE_22
#define PHASE_A_COMP_NUMBER COMP2

#define PHASE_B_EXTI_LINE LL_EXTI_LINE_21
#define PHASE_B_COMP_NUMBER COMP1

#define PHASE_C_EXTI_LINE LL_EXTI_LINE_21
#define PHASE_C_COMP_NUMBER COMP1

#define VOLTAGE_ADC_PIN LL_GPIO_PIN_5
#define VOLTAGE_ADC_CHANNEL LL_ADC_CHANNEL_5

#define CURRENT_ADC_PIN LL_GPIO_PIN_4
#define CURRENT_ADC_CHANNEL LL_ADC_CHANNEL_4

#endif

/************************************ G031 Hardware Groups
* ************************************************/

Expand Down
12 changes: 2 additions & 10 deletions Keil_Projects/AM32_MultiProject.uvmpw
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,36 @@

<project>
<PathAndName>.\Am32e230.uvprojx</PathAndName>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
</project>

<project>
<PathAndName>.\Am32F031.uvprojx</PathAndName>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
</project>

<project>
<PathAndName>.\Am32F051.uvprojx</PathAndName>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
</project>

<project>
<PathAndName>.\Am32F415.uvprojx</PathAndName>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
</project>

<project>
<PathAndName>.\Am32F421.uvprojx</PathAndName>
<NodeIsExpanded>1</NodeIsExpanded>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
<NodeIsActive>1</NodeIsActive>
</project>

<project>
<PathAndName>.\Am32G071.uvprojx</PathAndName>
<NodeIsActive>1</NodeIsActive>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
<NodeIsExpanded>1</NodeIsExpanded>
</project>

<project>
<PathAndName>.\Am32G431.uvprojx</PathAndName>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
</project>

<project>
<PathAndName>.\Am32l431.uvprojx</PathAndName>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
</project>

</ProjectWorkspace>
Loading
Loading