fix(sensors): Initialize sensor data to 0 before fetching.

Be sure we don't get back any uninitialized data by initializing
the channel data to 0 before calling into the sensor API.
This commit is contained in:
Peter Johanson 2025-03-30 10:03:26 -06:00
parent 1ed4d789c9
commit e2754a7e7f
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ static void trigger_sensor_data_for_position(uint32_t sensor_index) {
return;
}
struct sensor_value value;
struct sensor_value value = {0};
err = sensor_channel_get(item->dev, item->trigger.chan, &value);
if (err) {