auto-sync

This commit is contained in:
rusEfi 2016-11-01 09:02:29 -04:00
parent e7b8cd9646
commit 81570e5857
3 changed files with 11 additions and 6 deletions

View File

@ -49,6 +49,15 @@ engine_pins_s::engine_pins_s() {
}
}
void engine_pins_s::reset() {
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
injectors[i].reset();
}
for (int i = 0; i < IGNITION_PIN_COUNT;i++) {
coils[i].reset();
}
}
void InjectorOutputPin::reset() {
overlappingScheduleOffTime = 0;
cancelNextTurningInjectorOff = false;

View File

@ -66,6 +66,7 @@ public:
class engine_pins_s {
public:
engine_pins_s();
void reset();
OutputPin mainRelay;
OutputPin fanRelay;
OutputPin acRelay;

View File

@ -20,12 +20,7 @@ extern engine_pins_s enginePins;
EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persistentConfig) {
ec = &persistentConfig.engineConfiguration;
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
enginePins.injectors[i].reset();
}
for (int i = 0; i < IGNITION_PIN_COUNT;i++) {
enginePins.coils[i].reset();
}
enginePins.reset();
engineConfiguration = ec;
board_configuration_s * boardConfiguration = &engineConfiguration->bc;