would need to stop the buzzing at PRI.

This commit is contained in:
rusefillc 2022-11-15 11:01:56 -05:00
parent 51049b8de5
commit 9f88281566
2 changed files with 12 additions and 7 deletions

View File

@ -578,13 +578,13 @@ void EtbController::update() {
return;
}
if (engineConfiguration->disableEtbWhenEngineStopped) {
if (!engine->triggerCentral.engineMovedRecently()) {
// If engine is stopped and so configured, skip the ETB update entirely
// This is quieter and pulls less power than leaving it on all the time
m_motor->disable();
return;
}
if ((engineConfiguration->disableEtbWhenEngineStopped && !engine->triggerCentral.engineMovedRecently())
||
engine->engineState.lua.luaDisableEtb) {
// If engine is stopped and so configured, skip the ETB update entirely
// This is quieter and pulls less power than leaving it on all the time
m_motor->disable();
return;
}

View File

@ -755,6 +755,11 @@ void configureRusefiLuaHooks(lua_State* l) {
return 0;
});
lua_register(l, "setEtbDisabled", [](lua_State* l) {
auto luaAdjustment = luaL_checknumber(l, 1);
engine->engineState.lua.luaDisableEtb = lua_toboolean(l, 1);
return 0;
});
#endif // EFI_PROD_CODE
lua_register(l, "setClutchUpState", [](lua_State* l) {