2016-05-27 10:04:55 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <GCS_MAVLink/GCS.h>
|
|
|
|
|
2023-08-25 21:37:19 -03:00
|
|
|
// set 0 in 4.6, remove feature in 4.7:
|
|
|
|
#ifndef AP_MAVLINK_MAV_CMD_NAV_SET_YAW_SPEED_ENABLED
|
2024-06-01 08:30:56 -03:00
|
|
|
#define AP_MAVLINK_MAV_CMD_NAV_SET_YAW_SPEED_ENABLED 0
|
2023-08-25 21:37:19 -03:00
|
|
|
#endif
|
|
|
|
|
2024-01-23 19:57:16 -04:00
|
|
|
#include "defines.h"
|
|
|
|
|
2016-05-27 10:04:55 -03:00
|
|
|
class GCS_MAVLINK_Rover : public GCS_MAVLINK
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2019-06-19 08:26:19 -03:00
|
|
|
using GCS_MAVLINK::GCS_MAVLINK;
|
|
|
|
|
2016-05-27 10:04:55 -03:00
|
|
|
protected:
|
|
|
|
|
2016-05-29 21:08:46 -03:00
|
|
|
uint32_t telem_delay() const override;
|
|
|
|
|
2017-07-12 04:42:48 -03:00
|
|
|
uint8_t sysid_my_gcs() const override;
|
2018-12-13 19:12:34 -04:00
|
|
|
bool sysid_enforce() const override;
|
2017-07-12 04:42:48 -03:00
|
|
|
|
2023-09-07 07:13:30 -03:00
|
|
|
MAV_RESULT _handle_command_preflight_calibration(const mavlink_command_int_t &packet, const mavlink_message_t &msg) override;
|
2023-08-17 04:53:03 -03:00
|
|
|
MAV_RESULT handle_command_int_packet(const mavlink_command_int_t &packet, const mavlink_message_t &msg) override;
|
2020-09-07 09:17:50 -03:00
|
|
|
MAV_RESULT handle_command_int_do_reposition(const mavlink_command_int_t &packet);
|
2023-08-24 21:15:32 -03:00
|
|
|
MAV_RESULT handle_command_nav_set_yaw_speed(const mavlink_command_int_t &packet, const mavlink_message_t &msg);
|
2018-03-17 05:19:30 -03:00
|
|
|
|
2019-05-17 03:53:39 -03:00
|
|
|
void send_position_target_global_int() override;
|
|
|
|
|
2018-05-21 09:34:58 -03:00
|
|
|
bool persist_streamrates() const override { return true; }
|
|
|
|
|
2018-03-28 22:02:36 -03:00
|
|
|
uint64_t capabilities() const override;
|
2018-07-05 22:34:29 -03:00
|
|
|
|
2018-05-04 21:09:34 -03:00
|
|
|
void send_nav_controller_output() const override;
|
2019-02-28 19:31:59 -04:00
|
|
|
void send_pid_tuning() override;
|
2018-05-04 21:09:34 -03:00
|
|
|
|
2024-01-23 19:57:16 -04:00
|
|
|
#if HAL_LOGGING_ENABLED
|
|
|
|
uint32_t log_radio_bit() const override { return MASK_LOG_PM; }
|
|
|
|
#endif
|
|
|
|
|
2016-05-27 10:04:55 -03:00
|
|
|
private:
|
|
|
|
|
2024-01-23 02:41:49 -04:00
|
|
|
void handle_message(const mavlink_message_t &msg) override;
|
2016-05-27 10:04:55 -03:00
|
|
|
bool handle_guided_request(AP_Mission::Mission_Command &cmd) override;
|
|
|
|
bool try_send_message(enum ap_message id) override;
|
2018-03-22 06:21:07 -03:00
|
|
|
|
2022-11-21 23:40:31 -04:00
|
|
|
void handle_manual_control_axes(const mavlink_manual_control_t &packet, const uint32_t tnow) override;
|
2021-01-04 00:46:45 -04:00
|
|
|
void handle_set_attitude_target(const mavlink_message_t &msg);
|
|
|
|
void handle_set_position_target_local_ned(const mavlink_message_t &msg);
|
|
|
|
void handle_set_position_target_global_int(const mavlink_message_t &msg);
|
|
|
|
void handle_radio(const mavlink_message_t &msg);
|
2022-06-19 02:52:02 -03:00
|
|
|
void handle_landing_target(const mavlink_landing_target_t &msg, uint32_t timestamp_ms) override;
|
2021-01-04 00:46:45 -04:00
|
|
|
|
2021-08-24 11:18:45 -03:00
|
|
|
void send_servo_out();
|
|
|
|
|
2019-04-30 07:22:50 -03:00
|
|
|
void packetReceived(const mavlink_status_t &status, const mavlink_message_t &msg) override;
|
2018-07-07 02:12:45 -03:00
|
|
|
|
2018-03-22 06:21:07 -03:00
|
|
|
MAV_MODE base_mode() const override;
|
2019-11-25 22:46:07 -04:00
|
|
|
MAV_STATE vehicle_system_status() const override;
|
2018-01-30 22:11:27 -04:00
|
|
|
|
|
|
|
int16_t vfr_hud_throttle() const override;
|
|
|
|
|
2023-10-25 20:05:11 -03:00
|
|
|
#if AP_RANGEFINDER_ENABLED
|
2018-12-18 06:47:19 -04:00
|
|
|
void send_rangefinder() const override;
|
2023-10-25 20:05:11 -03:00
|
|
|
#endif
|
2018-12-18 06:47:19 -04:00
|
|
|
|
2021-07-06 07:53:38 -03:00
|
|
|
#if HAL_HIGH_LATENCY2_ENABLED
|
|
|
|
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
|
2016-05-27 10:04:55 -03:00
|
|
|
};
|