mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 05:13:35 +08:00
code clean up
This commit is contained in:
@@ -558,7 +558,7 @@ JetdriveControl::task_main()
|
||||
arming_status_poll();
|
||||
vehicle_manual_poll();
|
||||
|
||||
if(_v_control_mode.flag_external_manual_override_ok)
|
||||
if(!_v_control_mode.flag_control_offboard_enabled)
|
||||
{
|
||||
/* manual/direct control */
|
||||
_actuators.control[0] = _manual_control_sp .roll;
|
||||
|
||||
@@ -1728,7 +1728,6 @@ set_control_mode()
|
||||
control_mode.flag_control_climb_rate_enabled = false;
|
||||
control_mode.flag_control_position_enabled = false;
|
||||
control_mode.flag_control_velocity_enabled = false;
|
||||
control_mode.flag_external_manual_override_ok = false;
|
||||
break;
|
||||
case OFFBOARD_CONTROL_MODE_DIRECT_RATES:
|
||||
control_mode.flag_control_rates_enabled = true;
|
||||
@@ -1737,7 +1736,6 @@ set_control_mode()
|
||||
control_mode.flag_control_climb_rate_enabled = false;
|
||||
control_mode.flag_control_position_enabled = false;
|
||||
control_mode.flag_control_velocity_enabled = false;
|
||||
control_mode.flag_external_manual_override_ok = false;
|
||||
break;
|
||||
default:
|
||||
control_mode.flag_control_rates_enabled = false;
|
||||
|
||||
@@ -358,7 +358,7 @@ handle_message(mavlink_message_t *msg)
|
||||
|
||||
} else {
|
||||
/* publish */
|
||||
orb_publish(ORB_ID(vehicle_rates_setpoint), &rates_sp);
|
||||
orb_publish(ORB_ID(vehicle_rates_setpoint), rates_sp_pub, &rates_sp);
|
||||
}
|
||||
break;
|
||||
case OFFBOARD_CONTROL_MODE_DIRECT_ATTITUDE:
|
||||
|
||||
Reference in New Issue
Block a user