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>
|
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;
|
|
|
|
|
2019-04-30 07:22:51 -03:00
|
|
|
void handle_mission_set_current(AP_Mission &mission, const mavlink_message_t &msg) override;
|
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
|
|
|
|
2018-03-17 06:26:03 -03:00
|
|
|
MAV_RESULT handle_command_preflight_calibration(const mavlink_command_long_t &packet) override;
|
|
|
|
MAV_RESULT _handle_command_preflight_calibration(const mavlink_command_long_t &packet) 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;
|
2018-03-17 06:26:03 -03:00
|
|
|
|
2018-05-11 08:56:26 -03:00
|
|
|
void send_position_target_global_int() override;
|
|
|
|
|
2017-08-21 02:53:45 -03:00
|
|
|
virtual bool in_hil_mode() const 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;
|
2018-01-28 19:02:58 -04:00
|
|
|
void send_simstate() 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
|
|
|
|
2016-05-27 09:53:19 -03:00
|
|
|
private:
|
|
|
|
|
2019-02-28 19:33:00 -04:00
|
|
|
void send_pid_info(const AP_Logger::PID_Info *pid_info, const uint8_t axis, const float achieved);
|
|
|
|
|
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-04-30 07:22:51 -03:00
|
|
|
void handle_rc_channels_override(const mavlink_message_t &msg) 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;
|
|
|
|
|
2016-05-27 09:53:19 -03:00
|
|
|
};
|