CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/ArduSub/GCS_MAVLink_Sub.h
Views: 1798
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
uint8_t sysid_my_gcs() const override;
12
protected:
13
14
uint32_t telem_delay() const override {
15
return 0;
16
};
17
18
MAV_RESULT handle_flight_termination(const mavlink_command_int_t &packet) override;
19
20
MAV_RESULT handle_command_do_set_roi(const Location &roi_loc) override;
21
MAV_RESULT _handle_command_preflight_calibration_baro(const mavlink_message_t &msg) override;
22
MAV_RESULT _handle_command_preflight_calibration(const mavlink_command_int_t &packet, const mavlink_message_t &msg) override;
23
24
MAV_RESULT handle_command_int_packet(const mavlink_command_int_t &packet, const mavlink_message_t &msg) override;
25
MAV_RESULT handle_command_int_do_reposition(const mavlink_command_int_t &packet);
26
27
// override sending of scaled_pressure3 to send on-board temperature:
28
void send_scaled_pressure3() override;
29
30
int32_t global_position_int_alt() const override;
31
int32_t global_position_int_relative_alt() const override;
32
33
void send_banner() override;
34
35
void send_nav_controller_output() const override;
36
void send_pid_tuning() override;
37
38
uint64_t capabilities() const override;
39
40
// Send the mode with the given index (not mode number!) return the total number of modes
41
// Index starts at 1
42
uint8_t send_available_mode(uint8_t index) const override;
43
44
private:
45
46
void handle_message(const mavlink_message_t &msg) override;
47
bool handle_guided_request(AP_Mission::Mission_Command &cmd) override;
48
bool try_send_message(enum ap_message id) override;
49
50
bool send_info(void);
51
52
MAV_MODE base_mode() const override;
53
MAV_STATE vehicle_system_status() const override;
54
55
int16_t vfr_hud_throttle() const override;
56
float vfr_hud_alt() const override;
57
58
MAV_RESULT handle_MAV_CMD_CONDITION_YAW(const mavlink_command_int_t &packet);
59
MAV_RESULT handle_MAV_CMD_MISSION_START(const mavlink_command_int_t &packet);
60
MAV_RESULT handle_MAV_CMD_DO_CHANGE_SPEED(const mavlink_command_int_t &packet);
61
MAV_RESULT handle_MAV_CMD_DO_MOTOR_TEST(const mavlink_command_int_t &packet);
62
MAV_RESULT handle_MAV_CMD_NAV_LOITER_UNLIM(const mavlink_command_int_t &packet);
63
MAV_RESULT handle_MAV_CMD_NAV_LAND(const mavlink_command_int_t &packet);
64
65
#if HAL_HIGH_LATENCY2_ENABLED
66
int16_t high_latency_target_altitude() const override;
67
uint8_t high_latency_tgt_heading() const override;
68
uint16_t high_latency_tgt_dist() const override;
69
uint8_t high_latency_tgt_airspeed() const override;
70
#endif // HAL_HIGH_LATENCY2_ENABLED
71
};
72
73