forked from Archive/PX4-Autopilot
commander: update commander status when offboard control mode changed
This commit is contained in:
parent
ebf8bc898a
commit
77097b6adc
|
@ -1511,7 +1511,18 @@ Commander::run()
|
|||
orb_check(offboard_control_mode_sub, &updated);
|
||||
|
||||
if (updated) {
|
||||
offboard_control_mode_s old = offboard_control_mode;
|
||||
orb_copy(ORB_ID(offboard_control_mode), offboard_control_mode_sub, &offboard_control_mode);
|
||||
|
||||
if (old.ignore_thrust != offboard_control_mode.ignore_thrust ||
|
||||
old.ignore_attitude != offboard_control_mode.ignore_attitude ||
|
||||
old.ignore_bodyrate != offboard_control_mode.ignore_bodyrate ||
|
||||
old.ignore_position != offboard_control_mode.ignore_position ||
|
||||
old.ignore_velocity != offboard_control_mode.ignore_velocity ||
|
||||
old.ignore_acceleration_force != offboard_control_mode.ignore_acceleration_force ||
|
||||
old.ignore_alt_hold != offboard_control_mode.ignore_alt_hold) {
|
||||
status_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (offboard_control_mode.timestamp != 0 &&
|
||||
|
|
Loading…
Reference in New Issue