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() { void InjectorOutputPin::reset() {
overlappingScheduleOffTime = 0; overlappingScheduleOffTime = 0;
cancelNextTurningInjectorOff = false; cancelNextTurningInjectorOff = false;

View File

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

View File

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