GCS_MAVLink: support MAV_CMD_EXTERNAL_WIND_ESTIMATE
This commit is contained in:
parent
3344dba627
commit
e74afdfcea
@ -525,6 +525,7 @@ protected:
|
|||||||
|
|
||||||
virtual MAV_RESULT handle_command_int_packet(const mavlink_command_int_t &packet, const mavlink_message_t &msg);
|
virtual MAV_RESULT handle_command_int_packet(const mavlink_command_int_t &packet, const mavlink_message_t &msg);
|
||||||
MAV_RESULT handle_command_int_external_position_estimate(const mavlink_command_int_t &packet);
|
MAV_RESULT handle_command_int_external_position_estimate(const mavlink_command_int_t &packet);
|
||||||
|
MAV_RESULT handle_command_int_external_wind_estimate(const mavlink_command_int_t &packet);
|
||||||
|
|
||||||
#if AP_HOME_ENABLED
|
#if AP_HOME_ENABLED
|
||||||
MAV_RESULT handle_command_do_set_home(const mavlink_command_int_t &packet);
|
MAV_RESULT handle_command_do_set_home(const mavlink_command_int_t &packet);
|
||||||
|
@ -5233,6 +5233,21 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_external_position_estimate(const mavl
|
|||||||
}
|
}
|
||||||
#endif // AP_AHRS_POSITION_RESET_ENABLED
|
#endif // AP_AHRS_POSITION_RESET_ENABLED
|
||||||
|
|
||||||
|
#if AP_AHRS_EXTERNAL_WIND_ESTIMATE_ENABLED
|
||||||
|
MAV_RESULT GCS_MAVLINK::handle_command_int_external_wind_estimate(const mavlink_command_int_t &packet)
|
||||||
|
{
|
||||||
|
if (packet.param1 < 0) {
|
||||||
|
return MAV_RESULT_DENIED;
|
||||||
|
}
|
||||||
|
if (packet.param3 < 0 || packet.param3 > 360) {
|
||||||
|
return MAV_RESULT_DENIED;
|
||||||
|
}
|
||||||
|
|
||||||
|
AP::ahrs().set_external_wind_estimate(packet.param1, packet.param3);
|
||||||
|
return MAV_RESULT_ACCEPTED;
|
||||||
|
}
|
||||||
|
#endif // AP_AHRS_EXTERNAL_WIND_ESTIMATE_ENABLED
|
||||||
|
|
||||||
MAV_RESULT GCS_MAVLINK::handle_command_do_set_roi(const mavlink_command_int_t &packet)
|
MAV_RESULT GCS_MAVLINK::handle_command_do_set_roi(const mavlink_command_int_t &packet)
|
||||||
{
|
{
|
||||||
// be aware that this method is called for both MAV_CMD_DO_SET_ROI
|
// be aware that this method is called for both MAV_CMD_DO_SET_ROI
|
||||||
@ -5415,6 +5430,10 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_packet(const mavlink_command_int_t &p
|
|||||||
case MAV_CMD_EXTERNAL_POSITION_ESTIMATE:
|
case MAV_CMD_EXTERNAL_POSITION_ESTIMATE:
|
||||||
return handle_command_int_external_position_estimate(packet);
|
return handle_command_int_external_position_estimate(packet);
|
||||||
#endif
|
#endif
|
||||||
|
#if AP_AHRS_EXTERNAL_WIND_ESTIMATE_ENABLED
|
||||||
|
case MAV_CMD_EXTERNAL_WIND_ESTIMATE:
|
||||||
|
return handle_command_int_external_wind_estimate(packet);
|
||||||
|
#endif
|
||||||
#if AP_ARMING_ENABLED
|
#if AP_ARMING_ENABLED
|
||||||
case MAV_CMD_COMPONENT_ARM_DISARM:
|
case MAV_CMD_COMPONENT_ARM_DISARM:
|
||||||
return handle_command_component_arm_disarm(packet);
|
return handle_command_component_arm_disarm(packet);
|
||||||
|
Loading…
Reference in New Issue
Block a user