diff --git a/firmware/config/boards/hellen/alphax-4chan/board.mk b/firmware/config/boards/hellen/alphax-4chan/board.mk index 6c34e93aa3..bdb4048faa 100644 --- a/firmware/config/boards/hellen/alphax-4chan/board.mk +++ b/firmware/config/boards/hellen/alphax-4chan/board.mk @@ -36,3 +36,5 @@ else ifeq ($(PROJECT_CPU),ARCH_STM32F4) else $(error Unsupported PROJECT_CPU [$(PROJECT_CPU)]) endif + +DDEFS += -DHW_HELLEN_4CHAN=1 diff --git a/firmware/config/boards/hellen/alphax-8chan/board.mk b/firmware/config/boards/hellen/alphax-8chan/board.mk index d7c93c5f16..2c30864464 100644 --- a/firmware/config/boards/hellen/alphax-8chan/board.mk +++ b/firmware/config/boards/hellen/alphax-8chan/board.mk @@ -29,3 +29,4 @@ $(error Unsupported PROJECT_CPU [$(PROJECT_CPU)]) endif DDEFS += -DSHORT_BOARD_NAME=alphax-8chan -DSTATIC_BOARD_ID=STATIC_BOARD_ID_ALPHAX_8CHAN +DDEFS += -DHW_HELLEN_8CHAN=1 diff --git a/firmware/config/boards/hellen/hellen-nb1/board.mk b/firmware/config/boards/hellen/hellen-nb1/board.mk index d5c7229269..6f9b7c730d 100644 --- a/firmware/config/boards/hellen/hellen-nb1/board.mk +++ b/firmware/config/boards/hellen/hellen-nb1/board.mk @@ -19,3 +19,5 @@ include $(BOARDS_DIR)/hellen/hellen-common144.mk DDEFS += $(PRIMARY_COMMUNICATION_PORT_USART2) DDEFS += -DSHORT_BOARD_NAME=hellen-nb1 -DSTATIC_BOARD_ID=STATIC_BOARD_ID_HELLEN_NB1 + +DDEFS += -DHW_HELLEN_NB1=1 diff --git a/firmware/config/boards/hellen/hellen72/board.mk b/firmware/config/boards/hellen/hellen72/board.mk index 6ac38259c8..ba9d7ade5d 100644 --- a/firmware/config/boards/hellen/hellen72/board.mk +++ b/firmware/config/boards/hellen/hellen72/board.mk @@ -18,3 +18,4 @@ DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE DDEFS += -DSHORT_BOARD_NAME=hellen72 -DSTATIC_BOARD_ID=STATIC_BOARD_ID_HELLEN_72 include $(BOARDS_DIR)/hellen/hellen-common176.mk +DDEFS += -DHW_HELLEN_NB2=1 diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index b9bd6ac88a..31ee3badce 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -831,22 +831,37 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e break; #endif -#if HW_HELLEN +#if HW_HELLEN_4CHAN case engine_type_e::HELLEN_4CHAN_STIM_QC: alphax4chanStimQc(); break; +#endif + +#if HW_HELLEN_8CHAN + case engine_type_e::ALPHAX_8CHAN_SBC: + set8chanSbc(); + break; +#endif + +#if HW_HELLEN_NB1 + case engine_type_e::HELLEN_NB1: + setHellenNB1(); + break; +#endif + +#if HW_HELLEN_NB2 case engine_type_e::HELLEN_NB2: setMiataNB2_Hellen72(); break; case engine_type_e::HELLEN_NB2_36: setMiataNB2_Hellen72_36(); break; +#endif + +#if HW_HELLEN case engine_type_e::HELLEN_NA8_96: setHellenMiata96(); break; - case engine_type_e::HELLEN_NB1: - setHellenNB1(); - break; case engine_type_e::HELLEN_121_VAG_5_CYL: setHellen121Vag_5_cyl(); break; @@ -868,9 +883,6 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e case engine_type_e::HELLEN_NA94: setHellenNA94(); break; - case engine_type_e::ALPHAX_8CHAN_SBC: - set8chanSbc(); - break; case engine_type_e::HELLEN_HONDA_BCM: setHondaCivicBcm(); break; diff --git a/unit_tests/unit_test_rules.mk b/unit_tests/unit_test_rules.mk index fb6a477906..7805541b55 100644 --- a/unit_tests/unit_test_rules.mk +++ b/unit_tests/unit_test_rules.mk @@ -55,6 +55,7 @@ USE_OPT += -DEFI_UNIT_TEST=1 -DEFI_PROD_CODE=0 -DEFI_SIMULATOR=0 # Pretend we are all different hardware so that all canned engine configs are included USE_OPT += -DHW_MICRO_RUSEFI=1 -DHW_PROTEUS=1 -DHW_FRANKENSO=1 -DHW_HELLEN=1 -DHW_HELLEN_NISSAN=1 +USE_OPT += -DHW_HELLEN_NB1=1 -DHW_HELLEN_NB2=1 DDEFS += -DSHORT_BOARD_NAME=f407-discovery