From f299a4af33aea2d652d4af0edd69888847af7d82 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 19 Mar 2020 11:08:17 +1100 Subject: [PATCH] RC_Channel: added RC_OPTION bit for protocol logging --- libraries/RC_Channel/RC_Channel.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/RC_Channel/RC_Channel.h b/libraries/RC_Channel/RC_Channel.h index d06de4f799..842cb73c5b 100644 --- a/libraries/RC_Channel/RC_Channel.h +++ b/libraries/RC_Channel/RC_Channel.h @@ -356,6 +356,10 @@ public: return _options & uint32_t(Option::IGNORE_RECEIVER); } + bool log_raw_data() const { + return _options & uint32_t(Option::LOG_DATA); + } + float override_timeout_ms() const { return _override_timeout.get() * 1e3f; } @@ -374,6 +378,7 @@ protected: IGNORE_OVERRIDES = (1 << 1), // MAVLink overrides IGNORE_FAILSAFE = (1 << 2), // ignore RC failsafe bits FPORT_PAD = (1 << 3), // pad fport telem output + LOG_DATA = (1 << 4), // log rc input bytes }; void new_override_received() {