mirror of https://github.com/ArduPilot/ardupilot
Tracker: accept arm/disarm to any component ID, not just MAV_COMP_ID_SYSTEM_CONTROL
This commit is contained in:
parent
6103d5ebac
commit
3f6dd706d1
|
@ -343,16 +343,13 @@ MAV_RESULT GCS_MAVLINK_Tracker::handle_command_long_packet(const mavlink_command
|
|||
switch(packet.command) {
|
||||
|
||||
case MAV_CMD_COMPONENT_ARM_DISARM:
|
||||
if (packet.target_component == MAV_COMP_ID_SYSTEM_CONTROL) {
|
||||
if (is_equal(packet.param1,1.0f)) {
|
||||
tracker.arm_servos();
|
||||
return MAV_RESULT_ACCEPTED;
|
||||
} else if (is_zero(packet.param1)) {
|
||||
}
|
||||
if (is_zero(packet.param1)) {
|
||||
tracker.disarm_servos();
|
||||
return MAV_RESULT_ACCEPTED;
|
||||
} else {
|
||||
return MAV_RESULT_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
return MAV_RESULT_UNSUPPORTED;
|
||||
|
||||
|
|
Loading…
Reference in New Issue