diff --git a/firmware/controllers/trigger/trigger_emulator_algo.cpp b/firmware/controllers/trigger/trigger_emulator_algo.cpp index 220fc09bc8..535a5ee031 100644 --- a/firmware/controllers/trigger/trigger_emulator_algo.cpp +++ b/firmware/controllers/trigger/trigger_emulator_algo.cpp @@ -34,11 +34,6 @@ TriggerEmulatorHelper::TriggerEmulatorHelper() { EXTERN_ENGINE ; -static void fireShaftSignal(trigger_event_e signal) { - if (isUsefulSignal(signal, engineConfiguration)) - hwHandleShaftSignal(signal); -} - void TriggerEmulatorHelper::handleEmulatorCallback(PwmConfig *state, int stateIndex) { int prevIndex = (stateIndex + state->phaseCount - 1) % state->phaseCount; @@ -55,17 +50,17 @@ void TriggerEmulatorHelper::handleEmulatorCallback(PwmConfig *state, int stateIn if (primaryWheelState != newPrimaryWheelState) { primaryWheelState = newPrimaryWheelState; - fireShaftSignal(primaryWheelState ? SHAFT_PRIMARY_RISING : SHAFT_PRIMARY_FALLING); + hwHandleShaftSignal(primaryWheelState ? SHAFT_PRIMARY_RISING : SHAFT_PRIMARY_FALLING); } if (secondaryWheelState != newSecondaryWheelState) { secondaryWheelState = newSecondaryWheelState; - fireShaftSignal(secondaryWheelState ? SHAFT_SECONDARY_RISING : SHAFT_SECONDARY_FALLING); + hwHandleShaftSignal(secondaryWheelState ? SHAFT_SECONDARY_RISING : SHAFT_SECONDARY_FALLING); } if (thirdWheelState != new3rdWheelState) { thirdWheelState = new3rdWheelState; - fireShaftSignal(thirdWheelState ? SHAFT_3RD_RISING : SHAFT_3RD_FALLING); + hwHandleShaftSignal(thirdWheelState ? SHAFT_3RD_RISING : SHAFT_3RD_FALLING); } // print("hello %d\r\n", chTimeNow()); diff --git a/firmware/hw_layer/trigger_input.cpp b/firmware/hw_layer/trigger_input.cpp index 95d89732f7..4373e3cb6d 100644 --- a/firmware/hw_layer/trigger_input.cpp +++ b/firmware/hw_layer/trigger_input.cpp @@ -74,8 +74,6 @@ static void shaft_icu_period_callback(ICUDriver *icup) { // icucnt_t last_period = icuGetPeriod(icup); so far we are fine with system time trigger_event_e signal = isPrimary ? SHAFT_PRIMARY_FALLING : SHAFT_SECONDARY_FALLING; - if (CONFIG(useOnlyRisingEdgeForTrigger)) - return; hwHandleShaftSignal(signal); }