lua pedal is a thing: consequences

This commit is contained in:
rusefillc 2024-11-11 21:43:58 -05:00
parent 666680f275
commit 1723353e20
2 changed files with 2 additions and 8 deletions

View File

@ -170,12 +170,6 @@ bool EtbController::init(dc_function_e function, DcMotor *motor, pid_s *pidParam
}
if (!Sensor::isRedundant(m_positionSensor)) {
firmwareError(
ObdCode::OBD_TPS_Configuration,
"Use of electronic throttle requires %s to be redundant.",
Sensor::getSensorName(m_positionSensor)
);
etbErrorCode = (int8_t)TpsState::Redundancy;
return false;
}

View File

@ -192,7 +192,7 @@ TEST(etb, initializationNotRedundantTps) {
Sensor::setMockValue(SensorType::Tps1Primary, 0);
Sensor::setMockValue(SensorType::Tps1, 0.0f, false);
EXPECT_FATAL_ERROR(dut.init(DC_Throttle1, nullptr, nullptr, nullptr));
ASSERT_FALSE(dut.init(DC_Throttle1, nullptr, nullptr, nullptr));
}
TEST(etb, initializationNotRedundantPedal) {
@ -246,7 +246,7 @@ TEST(etb, initializationNoThrottles) {
Sensor::setMockValue(SensorType::Tps1Primary, 0);
Sensor::setMockValue(SensorType::Tps1, 0.0f, false);
EXPECT_FATAL_ERROR(initElectronicThrottle());
initElectronicThrottle();
}
TEST(etb, idlePlumbing) {