From 8f96580e9d088857d8de975d01961869bdd1f39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 1 Feb 2021 13:26:33 -0300 Subject: [PATCH] AP_RCProtocol: Add missing const in member functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_RCProtocol/AP_RCProtocol.h | 2 +- libraries/AP_RCProtocol/AP_RCProtocol_Backend.cpp | 2 +- libraries/AP_RCProtocol/AP_RCProtocol_Backend.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_RCProtocol/AP_RCProtocol.h b/libraries/AP_RCProtocol/AP_RCProtocol.h index 39c9f96c2e..2a1575ffa5 100644 --- a/libraries/AP_RCProtocol/AP_RCProtocol.h +++ b/libraries/AP_RCProtocol/AP_RCProtocol.h @@ -45,7 +45,7 @@ public: NONE //last enum always is None }; void init(); - bool valid_serial_prot() + bool valid_serial_prot() const { return _valid_serial_prot; } diff --git a/libraries/AP_RCProtocol/AP_RCProtocol_Backend.cpp b/libraries/AP_RCProtocol/AP_RCProtocol_Backend.cpp index e53714d92c..85e5a44c0c 100644 --- a/libraries/AP_RCProtocol/AP_RCProtocol_Backend.cpp +++ b/libraries/AP_RCProtocol/AP_RCProtocol_Backend.cpp @@ -37,7 +37,7 @@ bool AP_RCProtocol_Backend::new_input() return ret; } -uint8_t AP_RCProtocol_Backend::num_channels() +uint8_t AP_RCProtocol_Backend::num_channels() const { return _num_channels; } diff --git a/libraries/AP_RCProtocol/AP_RCProtocol_Backend.h b/libraries/AP_RCProtocol/AP_RCProtocol_Backend.h index 14596cb53e..19f3e503ea 100644 --- a/libraries/AP_RCProtocol/AP_RCProtocol_Backend.h +++ b/libraries/AP_RCProtocol/AP_RCProtocol_Backend.h @@ -32,7 +32,7 @@ public: uint16_t read(uint8_t chan); void read(uint16_t *pwm, uint8_t n); bool new_input(); - uint8_t num_channels(); + uint8_t num_channels() const; // support for receivers that have FC initiated bind support virtual void start_bind(void) {}