mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-26 01:50:36 +08:00
Mission block: Style improvement
Boolean logic improvement to avoid double assignment of true
This commit is contained in:
@@ -309,10 +309,7 @@ MissionBlock::is_mission_item_reached()
|
||||
// if the dot product (projected vector) is positive, then
|
||||
// the current position is between the gate position and the
|
||||
// next waypoint
|
||||
if (res >= 0) {
|
||||
gate_reached = true;
|
||||
|
||||
} else {
|
||||
if (res < 0) {
|
||||
gate_reached = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user