mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
ManualControl: Simplify check if switches updated
This commit is contained in:
parent
38ab7e6ab9
commit
48869ed03e
@ -93,12 +93,8 @@ void ManualControl::Run()
|
||||
}
|
||||
}
|
||||
|
||||
bool switches_updated = false;
|
||||
manual_control_switches_s switches;
|
||||
|
||||
if (_manual_control_switches_sub.update(&switches)) {
|
||||
switches_updated = true;
|
||||
}
|
||||
bool switches_updated = _manual_control_switches_sub.update(&switches);
|
||||
|
||||
if (_selector.setpoint().valid) {
|
||||
_published_invalid_once = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user