Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/ArduSub/GCS_MAVLink_Sub.h
9316 views
1
#pragma once
2
3
#include <GCS_MAVLink/GCS.h>
4
5
class GCS_MAVLINK_Sub : public GCS_MAVLINK {
6
7
public:
8
9
using GCS_MAVLINK::GCS_MAVLINK;
10
11
protected:
12
13
MAV_RESULT handle_flight_termination(const mavlink_command_int_t &packet) override;
14
15
MAV_RESULT handle_command_do_set_roi(const Location &roi_loc) override;
16
MAV_RESULT _handle_command_preflight_calibration_baro(const mavlink_message_t &msg) override;
17
MAV_RESULT _handle_command_preflight_calibration(const mavlink_command_int_t &packet, const mavlink_message_t &msg) override;
18
19
MAV_RESULT handle_command_int_packet(const mavlink_command_int_t &packet, const mavlink_message_t &msg) override;
20
MAV_RESULT handle_command_int_do_reposition(const mavlink_command_int_t &packet);
21
void handle_manual_control_axes(const mavlink_manual_control_t &packet, const uint32_t tnow) override;
22
23
// override sending of scaled_pressure3 to send on-board temperature:
24
void send_scaled_pressure3() override;
25
26
int32_t global_position_int_alt() const override;
27
int32_t global_position_int_relative_alt() const override;
28
29
void send_banner() override;
30
31
void send_nav_controller_output() const override;
32
void send_pid_tuning() override;
33
34
uint64_t capabilities() const override;
35
36
// Send the mode with the given index (not mode number!) return the total number of modes
37
// Index starts at 1
38
uint8_t send_available_mode(uint8_t index) const override;
39
40
private:
41
42
void handle_message(const mavlink_message_t &msg) override;
43
bool handle_guided_request(AP_Mission::Mission_Command &cmd) override;
44
bool try_send_message(enum ap_message id) override;
45
46
bool send_info(void);
47
48
uint8_t base_mode() const override;
49
MAV_STATE vehicle_system_status() const override;
50
51
int16_t vfr_hud_throttle() const override;
52
float vfr_hud_alt() const override;
53
54
MAV_RESULT handle_MAV_CMD_CONDITION_YAW(const mavlink_command_int_t &packet);
55
MAV_RESULT handle_MAV_CMD_MISSION_START(const mavlink_command_int_t &packet);
56
MAV_RESULT handle_MAV_CMD_DO_CHANGE_SPEED(const mavlink_command_int_t &packet);
57
MAV_RESULT handle_MAV_CMD_DO_MOTOR_TEST(const mavlink_command_int_t &packet);
58
MAV_RESULT handle_MAV_CMD_NAV_LOITER_UNLIM(const mavlink_command_int_t &packet);
59
MAV_RESULT handle_MAV_CMD_NAV_LAND(const mavlink_command_int_t &packet);
60
61
#if HAL_HIGH_LATENCY2_ENABLED
62
int16_t high_latency_target_altitude() const override;
63
uint8_t high_latency_tgt_heading() const override;
64
uint16_t high_latency_tgt_dist() const override;
65
uint8_t high_latency_tgt_airspeed() const override;
66
#endif // HAL_HIGH_LATENCY2_ENABLED
67
};
68
69