void setEngineType(int value) { engineConfiguration->engineType = (engine_type_e) value; resetConfigurationExt(&logger, (engine_type_e) value PASS_ENGINE_PARAMETER); #if EFI_WAVE_CHART || defined(__DOXYGEN__) if (engine->isTestMode) waveChart.resetWaveChart(); #endif #if EFI_INTERNAL_FLASH writeToFlashNow(); // scheduleReset(); #endif /* EFI_PROD_CODE */ incrementGlobalConfigurationVersion(); doPrintConfiguration(engine); }
void setTriggerEmulatorRPM(int rpm, Engine *engine) { engineConfiguration->bc.triggerSimulatorFrequency = rpm; /** * All we need to do here is to change the periodMs * togglePwmState() would see that the periodMs has changed and act accordingly */ if (rpm == 0) { triggerSignal.periodNt = NAN; } else { float rpmM = getRpmMultiplier(engineConfiguration->operationMode); float gRpm = rpm * rpmM / 60.0; // per minute converted to per second triggerSignal.periodNt = US2NT(frequency2periodUs(gRpm)); } #if EFI_ENGINE_SNIFFER if (engine->isTestMode) waveChart.resetWaveChart(); #endif /* EFI_ENGINE_SNIFFER */ scheduleMsg(logger, "Emulating position sensor(s). RPM=%d", rpm); }