Browse Source

RC_Channel: added FPort pad option

zr-v5.1
Andrew Tridgell 5 years ago
parent
commit
7769cf5316
  1. 6
      libraries/RC_Channel/RC_Channel.h
  2. 2
      libraries/RC_Channel/RC_Channels_VarInfo.h

6
libraries/RC_Channel/RC_Channel.h

@ -341,6 +341,11 @@ public: @@ -341,6 +341,11 @@ public:
return get_singleton() != nullptr && (_options & uint32_t(Option::IGNORE_FAILSAFE));
}
// should we add a pad byte to Fport data
bool fport_pad(void) const {
return get_singleton() != nullptr && (_options & uint32_t(Option::FPORT_PAD));
}
bool ignore_overrides() const {
return _options & uint32_t(Option::IGNORE_OVERRIDES);
}
@ -366,6 +371,7 @@ protected: @@ -366,6 +371,7 @@ protected:
IGNORE_RECEIVER = (1 << 0), // RC receiver modules
IGNORE_OVERRIDES = (1 << 1), // MAVLink overrides
IGNORE_FAILSAFE = (1 << 2), // ignore RC failsafe bits
FPORT_PAD = (1 << 3), // pad fport telem output
};
void new_override_received() {

2
libraries/RC_Channel/RC_Channels_VarInfo.h

@ -86,7 +86,7 @@ const AP_Param::GroupInfo RC_Channels::var_info[] = { @@ -86,7 +86,7 @@ const AP_Param::GroupInfo RC_Channels::var_info[] = {
// @DisplayName: RC options
// @Description: RC input options
// @User: Advanced
// @Bitmask: 0:Ignore RC Receiver, 1:Ignore MAVLink Overrides, 2:Ignore Receiver Failsafe
// @Bitmask: 0:Ignore RC Receiver, 1:Ignore MAVLink Overrides, 2:Ignore Receiver Failsafe, 3:FPort Pad
AP_GROUPINFO("_OPTIONS", 33, RC_CHANNELS_SUBCLASS, _options, 0),
AP_GROUPEND

Loading…
Cancel
Save