BMP280: Fix device ID setup

This commit is contained in:
Lorenz Meier
2017-01-28 19:56:46 +01:00
parent 8f77d55b8c
commit ec78830657
+2
View File
@@ -163,6 +163,8 @@ BMP280::BMP280(bmp280::IBMP280 *interface, const char *path) :
_comms_errors(perf_alloc(PC_COUNT, "bmp280_comms_errors")),
_buffer_overflows(perf_alloc(PC_COUNT, "bmp280_buffer_overflows"))
{
_device_id.devid_s.devtype = DRV_BARO_DEVTYPE_BMP280;
// work_cancel in stop_cycle called from the dtor will explode if we don't do this...
memset(&_work, 0, sizeof(_work));
}