mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Mission block: Style improvement
Boolean logic improvement to avoid double assignment of true
This commit is contained in:
parent
76b3c18625
commit
09595f88fc
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user