From af6846b9a8402d395946ce4be5328a8d0ceaa2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 14 Jun 2017 08:20:46 +0200 Subject: [PATCH] fix voted_sensors_update: use int32 for param_get() --- src/modules/sensors/voted_sensors_update.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/sensors/voted_sensors_update.cpp b/src/modules/sensors/voted_sensors_update.cpp index b2c76e2f4f..7473a0ef9f 100644 --- a/src/modules/sensors/voted_sensors_update.cpp +++ b/src/modules/sensors/voted_sensors_update.cpp @@ -250,7 +250,7 @@ void VotedSensorsUpdate::parameters_update() failed = false; (void)sprintf(str, "CAL_GYRO%u_ID", i); - int device_id; + int32_t device_id; failed = failed || (OK != param_get(param_find(str), &device_id)); if (failed) { @@ -306,7 +306,7 @@ void VotedSensorsUpdate::parameters_update() // run through all stored calibrations and reset them for (unsigned i = 0; i < GYRO_COUNT_MAX; i++) { - int device_id = 0; + int32_t device_id = 0; (void)sprintf(str, "CAL_GYRO%u_ID", i); (void)param_set(param_find(str), &device_id); } @@ -333,7 +333,7 @@ void VotedSensorsUpdate::parameters_update() failed = false; (void)sprintf(str, "CAL_ACC%u_ID", i); - int device_id; + int32_t device_id; failed = failed || (OK != param_get(param_find(str), &device_id)); if (failed) { @@ -389,7 +389,7 @@ void VotedSensorsUpdate::parameters_update() // run through all stored calibrations and reset them for (unsigned i = 0; i < ACCEL_COUNT_MAX; i++) { - int device_id = 0; + int32_t device_id = 0; (void)sprintf(str, "CAL_ACC%u_ID", i); (void)param_set(param_find(str), &device_id); } @@ -417,7 +417,7 @@ void VotedSensorsUpdate::parameters_update() failed = false; (void)sprintf(str, "CAL_MAG%u_ID", i); - int device_id; + int32_t device_id; failed = failed || (OK != param_get(param_find(str), &device_id)); if (failed) {