|
|
|
@ -77,7 +77,7 @@ static const int ERROR = -1;
@@ -77,7 +77,7 @@ static const int ERROR = -1;
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/* helper macro for handling report buffer indices */ |
|
|
|
|
#define INCREMENT(_x, _lim) do { _x++; if (_x >= _lim) _x = 0; } while(0) |
|
|
|
|
#define INCREMENT(_x, _lim) do { __typeof__(_x) _tmp = _x+1; if (_tmp >= _lim) _tmp = 0; _x = _tmp; } while(0) |
|
|
|
|
|
|
|
|
|
/* helper macro for arithmetic - returns the square of the argument */ |
|
|
|
|
#define POW2(_x) ((_x) * (_x)) |
|
|
|
@ -225,6 +225,12 @@ MS5611::~MS5611()
@@ -225,6 +225,12 @@ MS5611::~MS5611()
|
|
|
|
|
if (_reports != nullptr) |
|
|
|
|
delete[] _reports; |
|
|
|
|
|
|
|
|
|
// free perf counters
|
|
|
|
|
perf_free(_sample_perf); |
|
|
|
|
perf_free(_measure_perf); |
|
|
|
|
perf_free(_comms_errors); |
|
|
|
|
perf_free(_buffer_overflows); |
|
|
|
|
|
|
|
|
|
delete _interface; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|