Bosch bmp280 barometer cleanup

This commit is contained in:
Daniel Agar
2019-11-23 15:31:22 -05:00
committed by GitHub
parent cbea76f62a
commit 92559f7a85
11 changed files with 409 additions and 688 deletions
+7 -8
View File
@@ -275,12 +275,12 @@ BMM150::BMM150(int bus, const char *path, enum Rotation rotation) :
dig_xy1(0),
dig_xy2(0),
dig_xyz1(0),
_sample_perf(perf_alloc(PC_ELAPSED, "bmm150_read")),
_bad_transfers(perf_alloc(PC_COUNT, "bmm150_bad_transfers")),
_good_transfers(perf_alloc(PC_COUNT, "bmm150_good_transfers")),
_measure_perf(perf_alloc(PC_ELAPSED, "bmp280_measure")),
_comms_errors(perf_alloc(PC_COUNT, "bmp280_comms_errors")),
_duplicates(perf_alloc(PC_COUNT, "bmm150_duplicates")),
_sample_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": read")),
_bad_transfers(perf_alloc(PC_COUNT, MODULE_NAME": bad transfers")),
_good_transfers(perf_alloc(PC_COUNT, MODULE_NAME": good transfers")),
_measure_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": measure")),
_comms_errors(perf_alloc(PC_COUNT, MODULE_NAME": comms errors")),
_duplicates(perf_alloc(PC_COUNT, MODULE_NAME": duplicates")),
_rotation(rotation),
_got_duplicate(false)
{
@@ -295,7 +295,7 @@ BMM150::BMM150(int bus, const char *path, enum Rotation rotation) :
_scale.z_scale = 1.0f;
}
BMM150 :: ~BMM150()
BMM150::~BMM150()
{
/* make sure we are truly inactive */
stop();
@@ -322,7 +322,6 @@ BMM150 :: ~BMM150()
perf_free(_measure_perf);
perf_free(_comms_errors);
perf_free(_duplicates);
}
int BMM150::init()