Browse Source

AP_RCMapper: add static create method

master
Lucas De Marchi 8 years ago committed by Francisco Ferreira
parent
commit
c10a91964f
  1. 15
      libraries/AP_RCMapper/AP_RCMapper.h

15
libraries/AP_RCMapper/AP_RCMapper.h

@ -4,12 +4,15 @@ @@ -4,12 +4,15 @@
#include <AP_Common/AP_Common.h>
#include <AP_Param/AP_Param.h>
class RCMapper
{
class RCMapper {
public:
/// Constructor
///
RCMapper();
static RCMapper create() { return RCMapper{}; }
constexpr RCMapper(RCMapper &&other) = default;
/* Do not allow copies */
RCMapper(const RCMapper &other) = delete;
RCMapper &operator=(const RCMapper&) = delete;
/// roll - return input channel number for roll / aileron input
uint8_t roll() const { return _ch_roll; }
@ -32,6 +35,8 @@ public: @@ -32,6 +35,8 @@ public:
static const struct AP_Param::GroupInfo var_info[];
private:
RCMapper();
// channel mappings
AP_Int8 _ch_roll;
AP_Int8 _ch_pitch;

Loading…
Cancel
Save