AP_Baro: make crc4 a static member of AP_Baro_MS56xx

This commit is contained in:
Jonathan Challinger 2019-04-23 15:32:50 -07:00 committed by Andrew Tridgell
parent 2b6ca186a8
commit e29d03a994
2 changed files with 3 additions and 1 deletions

View File

@ -153,7 +153,7 @@ bool AP_Baro_MS56XX::_init()
/** /**
* MS56XX crc4 method from datasheet for 16 bytes (8 short values) * 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; uint16_t n_rem = 0;
uint8_t n_bit; uint8_t n_bit;

View File

@ -28,6 +28,8 @@ public:
static AP_Baro_Backend *probe(AP_Baro &baro, AP_HAL::OwnPtr<AP_HAL::Device> dev, enum MS56XX_TYPE ms56xx_type = BARO_MS5611); static AP_Baro_Backend *probe(AP_Baro &baro, AP_HAL::OwnPtr<AP_HAL::Device> dev, enum MS56XX_TYPE ms56xx_type = BARO_MS5611);
static uint16_t crc4(uint16_t *data);
private: private:
/* /*
* Update @accum and @count with the new sample in @val, taking into * Update @accum and @count with the new sample in @val, taking into