mirror of https://github.com/rusefi/rusefi.git
Add setBoostDutyAdd function to control only boost duty #4900
This commit is contained in:
parent
dca3b46896
commit
74e8291327
|
@ -34,6 +34,7 @@ void BoostController::init(IPwm* pwm, const ValueProvider3D* openLoopMap, const
|
|||
void BoostController::resetLua() {
|
||||
luaTargetAdd = 0;
|
||||
luaTargetMult = 1;
|
||||
luaOpenLoopAdd = 0;
|
||||
}
|
||||
|
||||
void BoostController::onConfigurationChange(pid_s* previousConfiguration) {
|
||||
|
@ -84,9 +85,10 @@ expected<percent_t> BoostController::getOpenLoop(float target) {
|
|||
|
||||
efiAssert(OBD_PCM_Processor_Fault, m_openLoopMap != nullptr, "boost open loop", unexpected);
|
||||
|
||||
openLoopPart = m_openLoopMap->getValue(rpm, tps.Value);
|
||||
openLoopPart = luaOpenLoopAdd + m_openLoopMap->getValue(rpm, tps.Value);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
// todo: why do we still copy this data point?
|
||||
engine->outputChannels.boostControllerOpenLoopPart = openLoopPart;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -733,14 +733,18 @@ void configureRusefiLuaHooks(lua_State* l) {
|
|||
});
|
||||
|
||||
#if EFI_BOOST_CONTROL
|
||||
lua_register(l, "setBoostAdd", [](lua_State* l) {
|
||||
lua_register(l, "setBoostTargetAdd", [](lua_State* l) {
|
||||
engine->boostController.luaTargetAdd = luaL_checknumber(l, 1);
|
||||
return 0;
|
||||
});
|
||||
lua_register(l, "setBoostMult", [](lua_State* l) {
|
||||
lua_register(l, "setBoostTargetMult", [](lua_State* l) {
|
||||
engine->boostController.luaTargetMult = luaL_checknumber(l, 1);
|
||||
return 0;
|
||||
});
|
||||
lua_register(l, "setBoostDutyAdd", [](lua_State* l) {
|
||||
engine->boostController.luaOpenLoopAdd = luaL_checknumber(l, 1);
|
||||
return 0;
|
||||
});
|
||||
#endif // EFI_BOOST_CONTROL
|
||||
#if EFI_IDLE_CONTROL
|
||||
lua_register(l, "setIdleAdd", [](lua_State* l) {
|
||||
|
|
Loading…
Reference in New Issue