diff --git a/firmware/controllers/actuators/boost_control.cpp b/firmware/controllers/actuators/boost_control.cpp index f7430a4b16..8335adb606 100644 --- a/firmware/controllers/actuators/boost_control.cpp +++ b/firmware/controllers/actuators/boost_control.cpp @@ -10,6 +10,7 @@ #include "boost_control.h" #include "electronic_throttle.h" +#include "gppwm_channel_reader.h" #define NO_PIN_PERIOD 500 @@ -96,7 +97,7 @@ expected BoostController::getOpenLoop(float target) { UNUSED(target); float rpm = Sensor::getOrZero(SensorType::Rpm); - auto driverIntent = Sensor::get(SensorType::DriverThrottleIntent); + auto driverIntent = readGppwmChannel(engineConfiguration->boostOpenLoopYAxis); isTpsInvalid = !driverIntent.Valid; diff --git a/unit_tests/tests/actuators/test_boost.cpp b/unit_tests/tests/actuators/test_boost.cpp index f6e4a19ca8..e5f8221c37 100644 --- a/unit_tests/tests/actuators/test_boost.cpp +++ b/unit_tests/tests/actuators/test_boost.cpp @@ -64,7 +64,7 @@ TEST(BoostControl, OpenLoop) { bc.init(nullptr, &openMap, nullptr, nullptr); // Should pass TPS value thru - Sensor::setMockValue(SensorType::DriverThrottleIntent, 47.0f); + Sensor::setMockValue(SensorType::Tps1, 47.0f); EXPECT_FLOAT_EQ(bc.getOpenLoop(0).value_or(-1), 47.0f); }