mirror of https://github.com/rusefi/rusefi-1.git
trying to fix AuxValves
This commit is contained in:
parent
02a49de390
commit
8584256677
|
@ -177,6 +177,7 @@ bool EnginePins::stopPins() {
|
|||
void EnginePins::unregisterPins() {
|
||||
stopInjectionPins();
|
||||
stopIgnitionPins();
|
||||
stopAuxValves();
|
||||
|
||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||
unregisterEtbPins();
|
||||
|
@ -247,12 +248,27 @@ void EnginePins::stopInjectionPins(void) {
|
|||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
void EnginePins::stopAuxValves(void) {
|
||||
#if EFI_PROD_CODE
|
||||
for (int i = 0; i < AUX_DIGITAL_VALVE_COUNT; i++) {
|
||||
NamedOutputPin *output = &enginePins.auxValve[i];
|
||||
// todo: do we need auxValveMode and reuse code?
|
||||
if (isConfigurationChanged(auxValves[i])) {
|
||||
(output)->deInit();
|
||||
}
|
||||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
void EnginePins::startAuxValves(void) {
|
||||
#if EFI_PROD_CODE
|
||||
for (int i = 0; i < AUX_DIGITAL_VALVE_COUNT; i++) {
|
||||
NamedOutputPin *output = &enginePins.auxValve[i];
|
||||
// todo: do we need auxValveMode and reuse code?
|
||||
if (isConfigurationChanged(auxValves[i])) {
|
||||
output->initPin(output->name, engineConfiguration->auxValves[i]);
|
||||
}
|
||||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
|
|
|
@ -216,6 +216,7 @@ private:
|
|||
|
||||
void stopInjectionPins();
|
||||
void stopIgnitionPins();
|
||||
void stopAuxValves();
|
||||
};
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
@ -351,7 +351,7 @@ void applyNewHardwareSettings(void) {
|
|||
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
||||
|
||||
#if EFI_AUX_PID
|
||||
stopAuxPins();
|
||||
stopVvtControlPins();
|
||||
#endif /* EFI_AUX_PID */
|
||||
|
||||
if (isConfigurationChanged(is_enabled_spi_1)) {
|
||||
|
|
Loading…
Reference in New Issue