AP_Networking: add timeout to swap the UDP Server client target
[ardupilot.git] / ArduPlane / RC_Channel.h
blob858034478c9bf170a43f64e68b570c4daf2efd69
1 #pragma once
3 #include <RC_Channel/RC_Channel.h>
5 class RC_Channel_Plane : public RC_Channel
8 public:
10 protected:
12 void init_aux_function(AUX_FUNC ch_option,
13 AuxSwitchPos ch_flag) override;
14 bool do_aux_function(AUX_FUNC ch_option, AuxSwitchPos) override;
16 // called when the mode switch changes position:
17 void mode_switch_changed(modeswitch_pos_t new_pos) override;
19 private:
21 void do_aux_function_change_mode(Mode::Number number,
22 AuxSwitchPos ch_flag);
24 #if HAL_QUADPLANE_ENABLED
25 void do_aux_function_q_assist_state(AuxSwitchPos ch_flag);
26 #endif
28 void do_aux_function_crow_mode(AuxSwitchPos ch_flag);
30 void do_aux_function_soaring_3pos(AuxSwitchPos ch_flag);
32 void do_aux_function_flare(AuxSwitchPos ch_flag);
36 class RC_Channels_Plane : public RC_Channels
38 public:
40 RC_Channel_Plane obj_channels[NUM_RC_CHANNELS];
41 RC_Channel_Plane *channel(const uint8_t chan) override {
42 if (chan >= NUM_RC_CHANNELS) {
43 return nullptr;
45 return &obj_channels[chan];
48 bool in_rc_failsafe() const override;
49 bool has_valid_input() const override;
51 RC_Channel *get_arming_channel(void) const override;
53 void read_mode_switch() override;
55 protected:
57 // note that these callbacks are not presently used on Plane:
58 int8_t flight_mode_channel_number() const override;