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() {
|
void EnginePins::unregisterPins() {
|
||||||
stopInjectionPins();
|
stopInjectionPins();
|
||||||
stopIgnitionPins();
|
stopIgnitionPins();
|
||||||
|
stopAuxValves();
|
||||||
|
|
||||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||||
unregisterEtbPins();
|
unregisterEtbPins();
|
||||||
|
@ -247,11 +248,26 @@ void EnginePins::stopInjectionPins(void) {
|
||||||
#endif /* EFI_PROD_CODE */
|
#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) {
|
void EnginePins::startAuxValves(void) {
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
for (int i = 0; i < AUX_DIGITAL_VALVE_COUNT; i++) {
|
for (int i = 0; i < AUX_DIGITAL_VALVE_COUNT; i++) {
|
||||||
NamedOutputPin *output = &enginePins.auxValve[i];
|
NamedOutputPin *output = &enginePins.auxValve[i];
|
||||||
output->initPin(output->name, engineConfiguration->auxValves[i]);
|
// todo: do we need auxValveMode and reuse code?
|
||||||
|
if (isConfigurationChanged(auxValves[i])) {
|
||||||
|
output->initPin(output->name, engineConfiguration->auxValves[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,6 +216,7 @@ private:
|
||||||
|
|
||||||
void stopInjectionPins();
|
void stopInjectionPins();
|
||||||
void stopIgnitionPins();
|
void stopIgnitionPins();
|
||||||
|
void stopAuxValves();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
|
@ -351,7 +351,7 @@ void applyNewHardwareSettings(void) {
|
||||||
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
||||||
|
|
||||||
#if EFI_AUX_PID
|
#if EFI_AUX_PID
|
||||||
stopAuxPins();
|
stopVvtControlPins();
|
||||||
#endif /* EFI_AUX_PID */
|
#endif /* EFI_AUX_PID */
|
||||||
|
|
||||||
if (isConfigurationChanged(is_enabled_spi_1)) {
|
if (isConfigurationChanged(is_enabled_spi_1)) {
|
||||||
|
|
Loading…
Reference in New Issue