diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index 8059dcbb01..beaa408f70 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -736,7 +736,7 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #endif /* EFI_PROD_CODE */ // If you don't have a pedal, we have no business here. - if (!Sensor::hasSensor(SensorType::AcceleratorPedal)) { + if (!Sensor::hasSensor(SensorType::AcceleratorPedalPrimary)) { return; } diff --git a/unit_tests/tests/test_etb.cpp b/unit_tests/tests/test_etb.cpp index b554e4952c..a78a39c327 100644 --- a/unit_tests/tests/test_etb.cpp +++ b/unit_tests/tests/test_etb.cpp @@ -43,6 +43,7 @@ TEST(etb, initializationSingleThrottle) { // Must have a sensor configured before init Sensor::setMockValue(SensorType::AcceleratorPedal, 0); + Sensor::setMockValue(SensorType::AcceleratorPedalPrimary, 0); // Expect mock0 to be init with index 0, and PID params EXPECT_CALL(mocks[0], init(_, 0, &engineConfiguration->etb, Ne(nullptr))); @@ -65,6 +66,7 @@ TEST(etb, initializationDualThrottle) { // Must have a sensor configured before init Sensor::setMockValue(SensorType::AcceleratorPedal, 0); + Sensor::setMockValue(SensorType::AcceleratorPedalPrimary, 0); // The presence of a second TPS indicates dual throttle Sensor::setMockValue(SensorType::Tps2, 25.0f);