diff --git a/firmware/config/engines/honda_accord.cpp b/firmware/config/engines/honda_accord.cpp index 328c266a30..c6d88d0e35 100644 --- a/firmware/config/engines/honda_accord.cpp +++ b/firmware/config/engines/honda_accord.cpp @@ -193,7 +193,7 @@ void setHondaAccordConfigurationDip(DECLARE_ENGINE_PARAMETER_F) { void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_F) { engineConfiguration->engineType = HONDA_ACCORD_CD_DIP; - engineConfiguration->trigger.type = TT_HONDA_ACCORD_1_24; + engineConfiguration->trigger.type = TT_HONDA_1_24; setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_F); } diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 55f673c511..0ea6f37970 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -159,8 +159,8 @@ case TT_GM_7X: return "TT_GM_7X"; case TT_HONDA_ACCORD_CD: return "TT_HONDA_ACCORD_CD"; -case TT_HONDA_ACCORD_1_24: - return "TT_HONDA_ACCORD_1_24"; +case TT_HONDA_1_24: + return "TT_HONDA_1_24"; case TT_HONDA_ACCORD_1_24_SHIFTED: return "ACCORD_1_24_SHIFTED"; case TT_DODGE_STRATUS: @@ -242,6 +242,8 @@ case T_PRIMARY: return "T_PRIMARY"; case T_SECONDARY: return "T_SECONDARY"; +case T_NONE: + return "T_NONE"; } return NULL; } diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 12a9655eeb..86f900a32a 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -180,7 +180,7 @@ typedef enum { TT_DODGE_RAM = 19, TT_60_2_VW = 20, - TT_HONDA_ACCORD_1_24 = 21, + TT_HONDA_1_24 = 21, TT_DODGE_STRATUS = 22, @@ -242,7 +242,8 @@ typedef enum { typedef enum { T_PRIMARY = 0, T_SECONDARY = 1, // todo: I really do not want to call this 'tertiary'. maybe we should rename all of these? - T_CHANNEL_3 = 2 + T_CHANNEL_3 = 2, + T_NONE = 15 } trigger_wheel_e; typedef enum { diff --git a/firmware/controllers/trigger/decoders/trigger_honda.cpp b/firmware/controllers/trigger/decoders/trigger_honda.cpp index 686189d912..dead34a796 100644 --- a/firmware/controllers/trigger/decoders/trigger_honda.cpp +++ b/firmware/controllers/trigger/decoders/trigger_honda.cpp @@ -96,16 +96,12 @@ void configureHondaAccordCDDip(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) { s->useOnlyPrimaryForSync = true; } -void configureHondaAccordCD(TriggerShape *s, bool withOneEventSignal, bool withFourEventSignal, +void configureHonda_1_24(TriggerShape *s, bool withOneEventSignal, bool withFourEventSignal, trigger_wheel_e const oneEventWave, trigger_wheel_e const fourEventWave, float prefix DECLARE_ENGINE_PARAMETER_S) { s->initialize(FOUR_STROKE_CAM_SENSOR, true); -// trigger_wheel_e const oneEventWave = T_CHANNEL_3; -// bool withFourEventSignal = true; -// trigger_wheel_e const fourEventWave = T_PRIMARY; - float sb = 5.0f + prefix; float tdcWidth = 0.1854 * 720 / 4; @@ -243,7 +239,7 @@ void configureHondaCbr600custom(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) { } -void configureHondaAccordShifter(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) { +void configureHondaAccordShifted(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) { float w = 720 / 2 / 24; s->initialize(FOUR_STROKE_CAM_SENSOR, true); diff --git a/firmware/controllers/trigger/decoders/trigger_honda.h b/firmware/controllers/trigger/decoders/trigger_honda.h index 264e4ede2a..5c39d2fe27 100644 --- a/firmware/controllers/trigger/decoders/trigger_honda.h +++ b/firmware/controllers/trigger/decoders/trigger_honda.h @@ -11,8 +11,9 @@ #include "trigger_structure.h" void configureHondaAccordCDDip(TriggerShape *s DECLARE_ENGINE_PARAMETER_S); -void configureHondaAccordShifter(TriggerShape *s DECLARE_ENGINE_PARAMETER_S); -void configureHondaAccordCD(TriggerShape *s, bool withOneEventSignal, bool withFourEventSignal, +void configureHondaAccordShifted(TriggerShape *s DECLARE_ENGINE_PARAMETER_S); + +void configureHonda_1_24(TriggerShape *s, bool withOneEventSignal, bool withFourEventSignal, trigger_wheel_e const oneEventWave, trigger_wheel_e const fourEventWave, float d DECLARE_ENGINE_PARAMETER_S); diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index 3a48a952ea..87763de7ef 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -522,20 +522,20 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET setToothedWheelConfiguration(triggerShape, 36, 1, engineConfiguration->operationMode PASS_ENGINE_PARAMETER); break; - case TT_HONDA_ACCORD_CD_TWO_WIRES: - configureHondaAccordCD(triggerShape, false, true, T_CHANNEL_3, T_PRIMARY, 0 PASS_ENGINE_PARAMETER); - break; - case TT_HONDA_ACCORD_CD: - configureHondaAccordCD(triggerShape, true, true, T_CHANNEL_3, T_PRIMARY, 0 PASS_ENGINE_PARAMETER); + configureHonda_1_24(triggerShape, true, true, T_CHANNEL_3, T_PRIMARY, 0 PASS_ENGINE_PARAMETER); break; - case TT_HONDA_ACCORD_1_24: - configureHondaAccordCD(triggerShape, true, false, T_PRIMARY, T_PRIMARY, 10 PASS_ENGINE_PARAMETER); + case TT_HONDA_ACCORD_CD_TWO_WIRES: + configureHonda_1_24(triggerShape, false, true, T_CHANNEL_3, T_PRIMARY, 0 PASS_ENGINE_PARAMETER); + break; + + case TT_HONDA_1_24: + configureHonda_1_24(triggerShape, true, false, T_PRIMARY, T_PRIMARY, 10 PASS_ENGINE_PARAMETER); break; case TT_HONDA_ACCORD_1_24_SHIFTED: - configureHondaAccordShifter(triggerShape PASS_ENGINE_PARAMETER); + configureHondaAccordShifted(triggerShape PASS_ENGINE_PARAMETER); break; case TT_HONDA_ACCORD_CD_DIP: