flash_main: writeToFlashIfPending() do nothing if EFI_FLASH_WRITE_THREAD

This commit is contained in:
Andrey Gusakov 2024-05-27 23:52:00 +03:00 committed by rusefillc
parent 83762a0948
commit aa62fea109
1 changed files with 3 additions and 0 deletions

View File

@ -93,8 +93,11 @@ bool getNeedToWriteConfiguration() {
}
void writeToFlashIfPending() {
#if EFI_FLASH_WRITE_THREAD
// with a flash write thread, the schedule happens directly from
// setNeedToWriteConfiguration, so there's nothing to do here
return;
#endif
if (allowFlashWhileRunning() || !getNeedToWriteConfiguration()) {
// Allow sensor timeouts again now that we're done (and a little time has passed)
Sensor::inhibitTimeouts(false);