TunerStudio: Save settings with self-simulation fix #1272
This commit is contained in:
parent
3abd181f6f
commit
6b171c97fb
|
@ -272,12 +272,21 @@ static void doPeriodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engine->rpmCalculator.setStopSpinning(PASS_ENGINE_PARAMETER_SIGNATURE);
|
engine->rpmCalculator.setStopSpinning(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
if (CONFIG(directSelfStimulation) || engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||||
|
/**
|
||||||
|
* rusEfi usually runs on hardware which halts execution while writing to internal flash, so we
|
||||||
|
* postpone writes to until engine is stopped. Writes in case of self-stimulation are fine.
|
||||||
|
*
|
||||||
|
* todo: allow writing if 2nd bank of flash is used
|
||||||
|
*/
|
||||||
#if EFI_INTERNAL_FLASH
|
#if EFI_INTERNAL_FLASH
|
||||||
writeToFlashIfPending();
|
writeToFlashIfPending();
|
||||||
#endif /* EFI_INTERNAL_FLASH */
|
#endif /* EFI_INTERNAL_FLASH */
|
||||||
resetAccel();
|
resetAccel();
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||||
updatePrimeInjectionPulseState(PASS_ENGINE_PARAMETER_SIGNATURE);
|
updatePrimeInjectionPulseState(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -707,6 +716,6 @@ int getRusEfiVersion(void) {
|
||||||
if (initBootloader() != 0)
|
if (initBootloader() != 0)
|
||||||
return 123;
|
return 123;
|
||||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||||
return 20200406;
|
return 20200408;
|
||||||
}
|
}
|
||||||
#endif /* EFI_UNIT_TEST */
|
#endif /* EFI_UNIT_TEST */
|
||||||
|
|
Loading…
Reference in New Issue