RC_Channel.h 549 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <RC_Channel/RC_Channel.h>
  3. class RC_Channel_Sub : public RC_Channel
  4. {
  5. public:
  6. protected:
  7. private:
  8. };
  9. class RC_Channels_Sub : public RC_Channels
  10. {
  11. public:
  12. RC_Channel_Sub obj_channels[NUM_RC_CHANNELS];
  13. RC_Channel_Sub *channel(const uint8_t chan) override {
  14. if (chan > NUM_RC_CHANNELS) {
  15. return nullptr;
  16. }
  17. return &obj_channels[chan];
  18. }
  19. protected:
  20. // note that these callbacks are not presently used on Plane:
  21. int8_t flight_mode_channel_number() const override;
  22. };