diff --git a/firmware/controllers/system/efiGpio.cpp b/firmware/controllers/system/efiGpio.cpp index 943c88d0cd..ea465260e0 100644 --- a/firmware/controllers/system/efiGpio.cpp +++ b/firmware/controllers/system/efiGpio.cpp @@ -86,6 +86,30 @@ void EnginePins::unregisterPins() { triggerDecoderErrorPin.unregisterOutput(activeConfiguration.bc.triggerErrorPin, engineConfiguration->bc.triggerErrorPin); + sdCsPin.unregisterOutput(activeConfiguration.bc.sdCardCsPin, engineConfiguration->bc.sdCardCsPin); + etbOutput1.unregisterOutput(activeConfiguration.bc.etbDirectionPin1, + engineConfiguration->bc.etbDirectionPin1); + etbOutput2.unregisterOutput(activeConfiguration.bc.etbDirectionPin2, + engineConfiguration->bc.etbDirectionPin2); + checkEnginePin.unregisterOutput(activeConfiguration.bc.malfunctionIndicatorPin, + engineConfiguration->bc.malfunctionIndicatorPin); + dizzyOutput.unregisterOutput(activeConfiguration.dizzySparkOutputPin, + engineConfiguration->dizzySparkOutputPin); + tachOut.unregisterOutput(activeConfiguration.bc.tachOutputPin, + engineConfiguration->bc.tachOutputPin); + idleSolenoidPin.unregisterOutput(activeConfiguration.bc.idle.solenoidPin, + engineConfiguration->bc.idle.solenoidPin); + + for (int i = 0;i < LE_COMMAND_COUNT;i++) { + fsioOutputs[i].unregisterOutput(activeConfiguration.bc.fsioPins[i], + engineConfiguration->bc.fsioPins[i]); + } + + alternatorPin.unregisterOutput(activeConfiguration.bc.alternatorControlPin, + engineConfiguration->bc.alternatorControlPin); + mainRelay.unregisterOutput(activeConfiguration.bc.mainRelayPin, + engineConfiguration->bc.mainRelayPin); + #endif /* EFI_PROD_CODE */ } diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp index ed7b1bff41..cff6ae5ce9 100644 --- a/firmware/hw_layer/hardware.cpp +++ b/firmware/hw_layer/hardware.cpp @@ -264,29 +264,6 @@ void applyNewHardwareSettings(void) { enginePins.unregisterPins(); - enginePins.sdCsPin.unregisterOutput(activeConfiguration.bc.sdCardCsPin, engineConfiguration->bc.sdCardCsPin); - enginePins.etbOutput1.unregisterOutput(activeConfiguration.bc.etbDirectionPin1, - engineConfiguration->bc.etbDirectionPin1); - enginePins.etbOutput2.unregisterOutput(activeConfiguration.bc.etbDirectionPin2, - engineConfiguration->bc.etbDirectionPin2); - enginePins.checkEnginePin.unregisterOutput(activeConfiguration.bc.malfunctionIndicatorPin, - engineConfiguration->bc.malfunctionIndicatorPin); - enginePins.dizzyOutput.unregisterOutput(activeConfiguration.dizzySparkOutputPin, - engineConfiguration->dizzySparkOutputPin); - enginePins.tachOut.unregisterOutput(activeConfiguration.bc.tachOutputPin, - engineConfiguration->bc.tachOutputPin); - enginePins.idleSolenoidPin.unregisterOutput(activeConfiguration.bc.idle.solenoidPin, - engineConfiguration->bc.idle.solenoidPin); - - for (int i = 0;i < LE_COMMAND_COUNT;i++) { - enginePins.fsioOutputs[i].unregisterOutput(activeConfiguration.bc.fsioPins[i], - engineConfiguration->bc.fsioPins[i]); - } - - enginePins.alternatorPin.unregisterOutput(activeConfiguration.bc.alternatorControlPin, - engineConfiguration->bc.alternatorControlPin); - enginePins.mainRelay.unregisterOutput(activeConfiguration.bc.mainRelayPin, - engineConfiguration->bc.mainRelayPin); startInjectionPins(); startIgnitionPins();