From e29d03a99457536adbeba62ae4fbd9c497181bbb Mon Sep 17 00:00:00 2001 From: Jonathan Challinger Date: Tue, 23 Apr 2019 15:32:50 -0700 Subject: [PATCH] AP_Baro: make crc4 a static member of AP_Baro_MS56xx --- libraries/AP_Baro/AP_Baro_MS5611.cpp | 2 +- libraries/AP_Baro/AP_Baro_MS5611.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Baro/AP_Baro_MS5611.cpp b/libraries/AP_Baro/AP_Baro_MS5611.cpp index 61669a5ada..2b84cb8397 100644 --- a/libraries/AP_Baro/AP_Baro_MS5611.cpp +++ b/libraries/AP_Baro/AP_Baro_MS5611.cpp @@ -153,7 +153,7 @@ bool AP_Baro_MS56XX::_init() /** * MS56XX crc4 method from datasheet for 16 bytes (8 short values) */ -static uint16_t crc4(uint16_t *data) +uint16_t AP_Baro_MS56XX::crc4(uint16_t *data) { uint16_t n_rem = 0; uint8_t n_bit; diff --git a/libraries/AP_Baro/AP_Baro_MS5611.h b/libraries/AP_Baro/AP_Baro_MS5611.h index 8f69f62060..c1689a56ad 100644 --- a/libraries/AP_Baro/AP_Baro_MS5611.h +++ b/libraries/AP_Baro/AP_Baro_MS5611.h @@ -27,6 +27,8 @@ public: }; static AP_Baro_Backend *probe(AP_Baro &baro, AP_HAL::OwnPtr dev, enum MS56XX_TYPE ms56xx_type = BARO_MS5611); + + static uint16_t crc4(uint16_t *data); private: /*