Clutch switch inverted options do not invert detected pedal position
#3545
This commit is contained in:
parent
2e3f37a771
commit
2495713af6
|
@ -82,16 +82,21 @@ TEST(LaunchControl, SwitchInputCondition) {
|
|||
engineConfiguration->clutchDownPin = GPIOG_2;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLUP;
|
||||
setMockState(engineConfiguration->clutchDownPin, true);
|
||||
engine->updateSwitchInputs(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
EXPECT_TRUE(dut.isInsideSwitchCondition());
|
||||
|
||||
setMockState(engineConfiguration->clutchDownPin, false);
|
||||
engine->updateSwitchInputs(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
EXPECT_FALSE(dut.isInsideSwitchCondition());
|
||||
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->clutchDownPinInverted = true;
|
||||
setMockState(engineConfiguration->clutchDownPin, false);
|
||||
engine->updateSwitchInputs(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
EXPECT_TRUE(dut.isInsideSwitchCondition());
|
||||
|
||||
setMockState(engineConfiguration->clutchDownPin, true);
|
||||
engine->updateSwitchInputs(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
EXPECT_FALSE(dut.isInsideSwitchCondition());
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue