diff --git a/src/lib/drivers/accelerometer/PX4Accelerometer.cpp b/src/lib/drivers/accelerometer/PX4Accelerometer.cpp index f09120a14578..38909a4b7457 100644 --- a/src/lib/drivers/accelerometer/PX4Accelerometer.cpp +++ b/src/lib/drivers/accelerometer/PX4Accelerometer.cpp @@ -117,7 +117,7 @@ void PX4Accelerometer::update(const hrt_abstime ×tamp_sample, float x, floa rotate_3f(_rotation, x, y, z); // publish - sensor_accel_s report; + sensor_accel_s report{}; report.timestamp_sample = timestamp_sample; report.device_id = _device_id; @@ -151,7 +151,7 @@ void PX4Accelerometer::updateFIFO(sensor_accel_fifo_s &sample) // publish - sensor_accel_s report; + sensor_accel_s report{}; report.timestamp_sample = sample.timestamp_sample; report.device_id = _device_id; report.temperature = _temperature;