From d1eb9e8aea00658e0e5afc43ce305387ad9ac758 Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Sun, 27 Sep 2020 01:39:01 +0530 Subject: [PATCH] AP_HAL: add FilteredCAN mode to tell driver to init as such --- libraries/AP_HAL/CANIface.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL/CANIface.h b/libraries/AP_HAL/CANIface.h index dca011f693..0fe858b328 100644 --- a/libraries/AP_HAL/CANIface.h +++ b/libraries/AP_HAL/CANIface.h @@ -94,9 +94,12 @@ public: enum OperatingMode { PassThroughMode, NormalMode, - SilentMode + SilentMode, + FilteredMode }; + OperatingMode get_operating_mode() { return mode_; } + typedef uint16_t CanIOFlags; static const CanIOFlags Loopback = 1; static const CanIOFlags AbortOnError = 2; @@ -206,4 +209,7 @@ public: // return true if init was called and successful virtual bool is_initialized() const = 0; +protected: + uint32_t bitrate_; + OperatingMode mode_; };