Idle air add via Lua fix #4465
This commit is contained in:
parent
ab11a57e33
commit
6d634e3c6a
|
@ -99,6 +99,8 @@ percent_t IdleController::getRunningOpenLoop(float clt, SensorResult tps) {
|
|||
running += enginePins.fanRelay.getLogicValue() ? engineConfiguration->fan1ExtraIdle : 0;
|
||||
running += enginePins.fanRelay2.getLogicValue() ? engineConfiguration->fan2ExtraIdle : 0;
|
||||
|
||||
running += luaAdd;
|
||||
|
||||
// Now bump it by the specified amount when the throttle is opened (if configured)
|
||||
// nb: invalid tps will make no change, no explicit check required
|
||||
iacByTpsTaper = interpolateClamped(
|
||||
|
|
|
@ -365,6 +365,7 @@ void Engine::resetLua() {
|
|||
#endif // EFI_BOOST_CONTROL
|
||||
ignitionState.luaTimingAdd = 0;
|
||||
ignitionState.luaTimingMult = 1;
|
||||
engine->module<IdleController>().unmock().luaAdd = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -683,6 +683,10 @@ void configureRusefiLuaHooks(lua_State* l) {
|
|||
return 0;
|
||||
});
|
||||
#endif // EFI_BOOST_CONTROL
|
||||
lua_register(l, "setIdleAdd", [](lua_State* l) {
|
||||
engine->module<IdleController>().unmock().luaAdd = luaL_checknumber(l, 1);
|
||||
return 0;
|
||||
});
|
||||
lua_register(l, "setTimingAdd", [](lua_State* l) {
|
||||
engine->ignitionState.luaTimingAdd = luaL_checknumber(l, 1);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue