prohibit mcu_standby on ECU start-up fix #6589

This commit is contained in:
rusefillc 2024-06-07 02:44:13 -04:00
parent a331b5873a
commit 4378eb4d18
2 changed files with 9 additions and 0 deletions

View File

@ -34,6 +34,7 @@ Release template (copy/paste this for new release):
- In Launch Control, add RPM Hysterisis #5610
- reduce JRE download complexity #6569
- simpler basic firmware updater #5577
- prohibit mcu_standby on ECU start-up #6589
### Fixed
- knock logic not activated until any configuration change via TS #6462

View File

@ -80,8 +80,16 @@ void configureRusefiLuaUtilHooks(lua_State* lState) {
return 1;
});
#ifndef STARTUP_STANDBY_PROHIBITED_PERIOD_SEC
#define STARTUP_STANDBY_PROHIBITED_PERIOD_SEC 3
#endif
#if defined(STM32F4) || defined(STM32F7)
lua_register(lState, "mcu_standby", [](lua_State*) {
if (getTimeNowS() < STARTUP_STANDBY_PROHIBITED_PERIOD_SEC) {
criticalError("mcu_standby invoked right on start");
return 0;
}
onBoardStandBy();
stm32_standby();
return 0;