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/RC_Channel_Blimp.h
Views: 1798
1
#pragma once
2
3
#include <RC_Channel/RC_Channel.h>
4
#include "Fins.h"
5
#include "mode.h" //this includes Blimp.h which includes Fins.h
6
7
class RC_Channel_Blimp : public RC_Channel
8
{
9
10
public:
11
12
protected:
13
14
void init_aux_function(AUX_FUNC ch_option, AuxSwitchPos) override;
15
bool do_aux_function(const AuxFuncTrigger &trigger) override;
16
17
private:
18
19
void do_aux_function_change_mode(const Mode::Number mode,
20
const AuxSwitchPos ch_flag);
21
void do_aux_function_change_air_mode(const AuxSwitchPos ch_flag);
22
23
// called when the mode switch changes position:
24
void mode_switch_changed(modeswitch_pos_t new_pos) override;
25
26
};
27
28
class RC_Channels_Blimp : public RC_Channels
29
{
30
public:
31
32
bool has_valid_input() const override;
33
bool in_rc_failsafe() const override;
34
35
RC_Channel *get_arming_channel(void) const override;
36
37
RC_Channel_Blimp obj_channels[NUM_RC_CHANNELS];
38
RC_Channel_Blimp *channel(const uint8_t chan) override
39
{
40
if (chan >= NUM_RC_CHANNELS) {
41
return nullptr;
42
}
43
return &obj_channels[chan];
44
}
45
46
protected:
47
48
int8_t flight_mode_channel_number() const override;
49
50
};
51
52