Mission block: Style improvement

Boolean logic improvement to avoid double assignment of true
This commit is contained in:
Lorenz Meier
2020-03-14 17:50:40 +01:00
parent 76b3c18625
commit 09595f88fc
+1 -4
View File
@@ -309,10 +309,7 @@ MissionBlock::is_mission_item_reached()
// if the dot product (projected vector) is positive, then // if the dot product (projected vector) is positive, then
// the current position is between the gate position and the // the current position is between the gate position and the
// next waypoint // next waypoint
if (res >= 0) { if (res < 0) {
gate_reached = true;
} else {
gate_reached = false; gate_reached = false;
} }
} }