Skip to content
Snippets Groups Projects
Commit 8d335d36 authored by Franz Bethke's avatar Franz Bethke Committed by lenoelda
Browse files

Fixed wrong bool expr in PLC

parent d1fd4836
Branches
No related merge requests found
......@@ -127,7 +127,7 @@ void PlatoonController::run_ACC()
// !inPlatoon + c2cAlive + wantsPlatoon
bool isLeader = c2c.getRole() == platoonProtocol::Vehicle::Role::LEADER;
bool hasFiniteDistance = egoMotion.getDistance() < std::numeric_limits<float>::infinity();
if (isLeader != hasFiniteDistance)
if (isLeader == inPlatoonRange)
{ // role does not fit
c2c.leavePlatoon();
c2cAlive = false;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment