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/Blimp/GCS_MAVLink_Blimp.h
Views: 1798
1
#pragma once
2
3
#include <GCS_MAVLink/GCS.h>
4
5
#include "defines.h"
6
7
class GCS_MAVLINK_Blimp : public GCS_MAVLINK
8
{
9
10
public:
11
12
using GCS_MAVLINK::GCS_MAVLINK;
13
14
protected:
15
16
uint32_t telem_delay() const override;
17
18
MAV_RESULT handle_flight_termination(const mavlink_command_int_t &packet) override;
19
20
uint8_t sysid_my_gcs() const override;
21
bool sysid_enforce() const override;
22
23
bool params_ready() const override;
24
void send_banner() override;
25
26
MAV_RESULT _handle_command_preflight_calibration(const mavlink_command_int_t &packet, const mavlink_message_t &msg) override;
27
28
void send_position_target_global_int() override;
29
30
MAV_RESULT handle_command_do_set_roi(const Location &roi_loc) override;
31
MAV_RESULT handle_command_int_packet(const mavlink_command_int_t &packet, const mavlink_message_t &msg) override;
32
MAV_RESULT handle_command_int_do_reposition(const mavlink_command_int_t &packet);
33
34
#if AP_MAVLINK_COMMAND_LONG_ENABLED
35
bool mav_frame_for_command_long(MAV_FRAME &frame, MAV_CMD packet_command) const override;
36
#endif
37
38
void send_nav_controller_output() const override; //TODO Apparently can't remove this or the build fails.
39
uint64_t capabilities() const override;
40
41
virtual MAV_VTOL_STATE vtol_state() const override
42
{
43
return MAV_VTOL_STATE_MC;
44
};
45
virtual MAV_LANDED_STATE landed_state() const override;
46
47
#if HAL_LOGGING_ENABLED
48
uint32_t log_radio_bit() const override { return MASK_LOG_PM; }
49
#endif
50
51
// Send the mode with the given index (not mode number!) return the total number of modes
52
// Index starts at 1
53
uint8_t send_available_mode(uint8_t index) const override;
54
55
private:
56
57
void handle_message(const mavlink_message_t &msg) override;
58
bool try_send_message(enum ap_message id) override;
59
60
void packetReceived(const mavlink_status_t &status,
61
const mavlink_message_t &msg) override;
62
63
MAV_MODE base_mode() const override;
64
MAV_STATE vehicle_system_status() const override;
65
66
float vfr_hud_airspeed() const override;
67
int16_t vfr_hud_throttle() const override;
68
float vfr_hud_alt() const override;
69
70
void send_pid_tuning() override;
71
72
void send_wind() const;
73
74
//This is 1-indexed, unlike most enums for consistency with the mavlink PID_TUNING enums.
75
enum PID_SEND : uint8_t {
76
VELX = 1,
77
VELY = 2,
78
VELZ = 3,
79
VELYAW = 4,
80
POSX = 5,
81
POSY = 6,
82
POSZ = 7,
83
POSYAW = 8,
84
};
85
86
#if HAL_HIGH_LATENCY2_ENABLED
87
uint8_t high_latency_wind_speed() const override;
88
uint8_t high_latency_wind_direction() const override;
89
#endif // HAL_HIGH_LATENCY2_ENABLED
90
};
91
92