mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 18:43:33 +08:00
Removed actuator_control_mode flags...Using pre-existing flags instead
This commit is contained in:
committed by
Thomas Gubler
parent
d7dc3a3ee8
commit
220fb19eb7
@@ -520,7 +520,7 @@ FixedwingAttitudeControl::vehicle_control_mode_poll()
|
||||
orb_check(_vcontrol_mode_sub, &vcontrol_mode_updated);
|
||||
|
||||
if (vcontrol_mode_updated) {
|
||||
//vehicle_control_mode_s
|
||||
|
||||
orb_copy(ORB_ID(vehicle_control_mode), _vcontrol_mode_sub, &_vcontrol_mode);
|
||||
}
|
||||
}
|
||||
@@ -1077,8 +1077,9 @@ FixedwingAttitudeControl::task_main()
|
||||
_actuators_airframe.timestamp = hrt_absolute_time();
|
||||
_actuators_airframe.timestamp_sample = _att.timestamp;
|
||||
|
||||
/* Only publish if actuator_control mode is not enabled */
|
||||
if(!_vcontrol_mode.flag_control_offboard_actuator_control_enabled)
|
||||
/* Only publish if any of the proper modes are enabled */
|
||||
if(_vcontrol_mode.flag_control_rates_enabled ||
|
||||
_vcontrol_mode.flag_control_attitude_enabled)
|
||||
{
|
||||
/* publish the actuator controls */
|
||||
if (_actuators_0_pub > 0) {
|
||||
|
||||
Reference in New Issue
Block a user