2016-05-27 09:53:19 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <GCS_MAVLink/GCS.h>
|
2019-04-04 07:44:18 -03:00
|
|
|
#include <AP_Logger/AP_Logger.h>
|
2022-10-17 05:36:02 -03:00
|
|
|
#include <AP_Airspeed/AP_Airspeed_config.h>
|
2016-05-27 09:53:19 -03:00
|
|
|
|
|
|
|
class GCS_MAVLINK_Plane : public GCS_MAVLINK
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2019-06-18 07:37:53 -03:00
|
|
|
using GCS_MAVLINK::GCS_MAVLINK;
|
|
|
|
|
2016-05-27 09:53:19 -03:00
|
|
|
protected:
|
|
|
|
|
2016-05-29 21:08:39 -03:00
|
|
|
uint32_t telem_delay() const override;
|
|
|
|
|
2023-03-16 03:14:28 -03:00
|
|
|
#if AP_MAVLINK_MISSION_SET_CURRENT_ENABLED
|
2019-04-30 07:22:51 -03:00
|
|
|
void handle_mission_set_current(AP_Mission &mission, const mavlink_message_t &msg) override;
|
2023-03-16 03:14:28 -03:00
|
|
|
#endif
|
2017-07-08 00:12:52 -03:00
|
|
|
|
2017-07-12 04:41:28 -03:00
|
|
|
uint8_t sysid_my_gcs() const override;
|
2018-12-13 19:12:52 -04:00
|
|
|
bool sysid_enforce() const override;
|
2017-07-12 04:41:28 -03:00
|
|
|
|
2022-12-08 02:47:13 -04:00
|
|
|
MAV_RESULT handle_command_preflight_calibration(const mavlink_command_long_t &packet, const mavlink_message_t &msg) override;
|
2018-07-04 00:14:29 -03:00
|
|
|
MAV_RESULT handle_command_int_packet(const mavlink_command_int_t &packet) override;
|
2018-07-04 00:08:22 -03:00
|
|
|
MAV_RESULT handle_command_long_packet(const mavlink_command_long_t &packet) override;
|
2021-02-23 00:05:09 -04:00
|
|
|
MAV_RESULT handle_command_do_set_mission_current(const mavlink_command_long_t &packet) override;
|
2018-03-17 06:26:03 -03:00
|
|
|
|
2018-05-11 08:56:26 -03:00
|
|
|
void send_position_target_global_int() override;
|
|
|
|
|
2019-11-24 18:24:02 -04:00
|
|
|
void send_aoa_ssa();
|
2018-05-02 03:51:32 -03:00
|
|
|
void send_attitude() const override;
|
2019-11-24 18:28:33 -04:00
|
|
|
void send_wind() const;
|
2018-05-02 03:51:32 -03:00
|
|
|
|
2018-05-21 09:35:28 -03:00
|
|
|
bool persist_streamrates() const override { return true; }
|
|
|
|
|
2018-05-29 20:47:50 -03:00
|
|
|
bool set_home_to_current_location(bool lock) override WARN_IF_UNUSED;
|
|
|
|
bool set_home(const Location& loc, bool lock) override WARN_IF_UNUSED;
|
2018-03-28 22:03:57 -03:00
|
|
|
uint64_t capabilities() const override;
|
2018-07-05 22:12:54 -03:00
|
|
|
|
2018-05-04 21:10:31 -03:00
|
|
|
void send_nav_controller_output() const override;
|
2019-02-28 19:33:00 -04:00
|
|
|
void send_pid_tuning() override;
|
2018-05-04 21:10:31 -03:00
|
|
|
|
2022-11-21 23:35:46 -04:00
|
|
|
void handle_manual_control_axes(const mavlink_manual_control_t &packet, const uint32_t tnow) override;
|
|
|
|
|
2016-05-27 09:53:19 -03:00
|
|
|
private:
|
|
|
|
|
2022-03-03 23:29:49 -04:00
|
|
|
void send_pid_info(const AP_PIDInfo *pid_info, const uint8_t axis, const float achieved);
|
2019-02-28 19:33:00 -04:00
|
|
|
|
2019-04-30 07:22:51 -03:00
|
|
|
void handleMessage(const mavlink_message_t &msg) override;
|
2016-05-27 09:53:19 -03:00
|
|
|
bool handle_guided_request(AP_Mission::Mission_Command &cmd) override;
|
|
|
|
void handle_change_alt_request(AP_Mission::Mission_Command &cmd) override;
|
2019-08-05 05:47:44 -03:00
|
|
|
MAV_RESULT handle_command_int_do_reposition(const mavlink_command_int_t &packet);
|
2020-05-16 01:02:01 -03:00
|
|
|
MAV_RESULT handle_command_int_guided_slew_commands(const mavlink_command_int_t &packet);
|
2019-08-05 05:47:44 -03:00
|
|
|
|
|
|
|
|
2016-05-27 09:53:19 -03:00
|
|
|
bool try_send_message(enum ap_message id) override;
|
2019-04-30 07:22:51 -03:00
|
|
|
void packetReceived(const mavlink_status_t &status, const mavlink_message_t &msg) override;
|
2016-05-27 09:53:19 -03:00
|
|
|
|
2018-03-22 06:16:35 -03:00
|
|
|
MAV_MODE base_mode() const override;
|
2019-11-25 22:46:28 -04:00
|
|
|
MAV_STATE vehicle_system_status() const override;
|
2018-05-02 07:40:30 -03:00
|
|
|
|
|
|
|
uint8_t radio_in_rssi() const;
|
2018-01-28 18:59:58 -04:00
|
|
|
|
|
|
|
float vfr_hud_airspeed() const override;
|
|
|
|
int16_t vfr_hud_throttle() const override;
|
|
|
|
float vfr_hud_climbrate() const override;
|
2021-07-06 07:30:59 -03:00
|
|
|
|
|
|
|
#if HAL_HIGH_LATENCY2_ENABLED
|
|
|
|
int16_t high_latency_target_altitude() const override;
|
|
|
|
uint8_t high_latency_tgt_heading() const override;
|
|
|
|
uint16_t high_latency_tgt_dist() const override;
|
|
|
|
uint8_t high_latency_tgt_airspeed() const override;
|
|
|
|
uint8_t high_latency_wind_speed() const override;
|
|
|
|
uint8_t high_latency_wind_direction() const override;
|
|
|
|
#endif // HAL_HIGH_LATENCY2_ENABLED
|
2018-05-23 06:32:35 -03:00
|
|
|
|
2022-10-17 05:36:02 -03:00
|
|
|
#if AP_AIRSPEED_HYGROMETER_ENABLE
|
|
|
|
void send_hygrometer();
|
|
|
|
uint8_t last_hygrometer_send_idx;
|
|
|
|
#endif
|
|
|
|
|
2018-05-23 06:32:35 -03:00
|
|
|
MAV_VTOL_STATE vtol_state() const override;
|
|
|
|
MAV_LANDED_STATE landed_state() const override;
|
|
|
|
|
2016-05-27 09:53:19 -03:00
|
|
|
};
|