From 254c16f5bc368cc2e4f8b4100175eccdce3ded5a Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 13 Feb 2023 19:17:47 -0500 Subject: [PATCH] Nick wonders if DC wastegate is still FUBAR #5075 --- firmware/config/engines/custom_engine.cpp | 4 +++- firmware/controllers/actuators/electronic_throttle.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/config/engines/custom_engine.cpp b/firmware/config/engines/custom_engine.cpp index 13213e8eab..22386d8a28 100644 --- a/firmware/config/engines/custom_engine.cpp +++ b/firmware/config/engines/custom_engine.cpp @@ -583,7 +583,9 @@ mapSensor = Sensor.new("map") mapSensor : setTimeout(3000) function onTick() - mapSensor : set(40) + local tps = getSensor("TPS1") + tps = (tps == nil and 0 or tps) + mapSensor : set(tps) end )", efi::size(config->luaScript)); diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index 32ed8e020c..0f87b7e4eb 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -633,7 +633,7 @@ void EtbController::update() { if (getFunction() == ETB_Wastegate) { // boost controller runs it's own PID we just take the result m_motor->enable(); - m_motor->set(getWastegateOutput()); + m_motor->set(getWastegateOutput() / PERCENT_MULT); return; }