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