Skip to content

Commit 34ba08e

Browse files
committed
models: Fix actuation state is_consistent() method
1 parent 0d75409 commit 34ba08e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

models/src/cloe/utility/actuation_state.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@ bool ActuationState::is_consistent() const {
4040
case ActuationLevel::None:
4141
// fallthrough, because none looks the same as standby
4242
case ActuationLevel::Standby:
43-
return aeb && !(acceleration || steering_angle || steering_torque);
43+
return aeb || !(acceleration || steering_angle || steering_torque);
4444
case ActuationLevel::Long:
45-
return aeb && (acceleration && !steering_angle && !steering_torque);
45+
return aeb || (acceleration && !steering_angle && !steering_torque);
4646
case ActuationLevel::Lat:
47-
return aeb && (!acceleration && (steering_angle || steering_torque) &&
48-
!(steering_angle && steering_torque));
47+
return aeb || (!acceleration && (steering_angle != steering_torque);
4948
case ActuationLevel::LatLong:
50-
return aeb && (acceleration && (steering_angle || steering_torque) &&
51-
!(steering_angle && steering_torque));
49+
return aeb || (acceleration && (steering_angle != steering_torque));
5250
default:
5351
// Assuming that AEB is active even when the function is not.
5452
return aeb;

0 commit comments

Comments
 (0)