drivers fix missing field initializers

This commit is contained in:
Daniel Agar
2017-09-16 21:29:52 +01:00
committed by Nuno Marques
parent 35e15ed540
commit 79869c848f
7 changed files with 11 additions and 14 deletions
+1 -3
View File
@@ -247,7 +247,6 @@ usage()
BMM150 :: BMM150(int bus, const char *path, bool external, enum Rotation rotation) :
I2C("BMM150", path, bus, BMM150_SLAVE_ADDRESS, BMM150_BUS_SPEED),
_work{},
_external(false),
_running(false),
_call_interval(0),
@@ -279,8 +278,7 @@ BMM150 :: BMM150(int bus, const char *path, bool external, enum Rotation rotatio
_comms_errors(perf_alloc(PC_COUNT, "bmp280_comms_errors")),
_duplicates(perf_alloc(PC_COUNT, "bmm150_duplicates")),
_rotation(rotation),
_got_duplicate(false),
_last_report{0}
_got_duplicate(false)
{
_device_id.devid_s.devtype = DRV_MAG_DEVTYPE_BMM150;
+3 -2
View File
@@ -219,7 +219,7 @@ protected:
virtual int probe();
private:
work_s _work;
work_s _work{};
bool _external;
bool _running;
@@ -228,6 +228,7 @@ private:
unsigned _call_interval;
mag_report _report {};
ringbuffer::RingBuffer *_reports;
bool _collect_phase;
@@ -268,7 +269,7 @@ private:
enum Rotation _rotation;
bool _got_duplicate;
struct mag_report _last_report; /**< used for info() */
mag_report _last_report {}; /**< used for info() */
int init_trim_registers(void);