Revert "future home of quick&dirty VVT simulation only:mre_f4"

This reverts commit dfd3fde5
This commit is contained in:
rusefillc 2023-10-25 13:02:57 -04:00
parent 36c4af6a77
commit 0ce7bf586b
1 changed files with 1 additions and 26 deletions

View File

@ -144,28 +144,13 @@ static void emulatorApplyPinState(int stateIndex, PwmConfig *state) /* pwm_gen_c
#endif /* EFI_PROD_CODE */
}
static bool hackVvtSim = false;
static TriggerWaveform * getTriggerForEmulation() {
#if EFI_SIMULATOR
if (hackVvtSim) {
static TriggerWaveform mShape;
trigger_config_s triggerType;
triggerType.type = trigger_type_e::TT_MAZDA_MIATA_NA;
mShape.initializeTriggerWaveform(FOUR_STROKE_CAM_SENSOR, triggerType);
return &mShape;
}
#endif
return &engine->triggerCentral.triggerShape;
}
static void startSimulatedTriggerSignal() {
// No need to start more than once
if (hasInitTriggerEmulator) {
return;
}
TriggerWaveform *s = getTriggerForEmulation();
TriggerWaveform *s = &engine->triggerCentral.triggerShape;
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorRpm);
triggerEmulatorSignal.weComplexInit(
&engine->executor,
@ -209,22 +194,12 @@ void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousCo
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorRpm);
}
static void hackVvtSimulation() {
disableTriggerStimulator();
hackVvtSim = true;
enableTriggerStimulator();
}
void initTriggerEmulator() {
efiPrintf("Emulating %s", getEngine_type_e(engineConfiguration->engineType));
startTriggerEmulatorPins();
addConsoleActionI(CMD_RPM, setTriggerEmulatorRPM);
#if 0
hackVvtSimulation();
#endif
addConsoleAction("sim_mitsu", hackVvtSimulation);
}
#endif /* EFI_UNIT_TEST */