From 4333a29a4109b64a7f44a333cf518be088b5d2cc Mon Sep 17 00:00:00 2001 From: Hauke Petersen <hauke.petersen@fu-berlin.de> Date: Mon, 22 Jan 2018 17:11:42 +0100 Subject: [PATCH] tests/drivers: adapt to changed fmt_s16_dfp semantics --- tests/driver_dht/main.c | 4 ++-- tests/driver_hdc1000/main.c | 4 ++-- tests/driver_lis2dh12/main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/driver_dht/main.c b/tests/driver_dht/main.c index 8f6e2d0433..11fc171707 100644 --- a/tests/driver_dht/main.c +++ b/tests/driver_dht/main.c @@ -57,9 +57,9 @@ int main(void) continue; } - size_t n = fmt_s16_dfp(temp_s, temp, 1); + size_t n = fmt_s16_dfp(temp_s, temp, -1); temp_s[n] = '\0'; - n = fmt_s16_dfp(hum_s, hum, 1); + n = fmt_s16_dfp(hum_s, hum, -1); hum_s[n] = '\0'; printf("DHT values - temp: %s°C - relative humidity: %s%%\n", diff --git a/tests/driver_hdc1000/main.c b/tests/driver_hdc1000/main.c index 864024c484..03e268c3f7 100644 --- a/tests/driver_hdc1000/main.c +++ b/tests/driver_hdc1000/main.c @@ -51,9 +51,9 @@ int main(void) size_t len; hdc1000_read(&dev, &temp, &hum); - len = fmt_s16_dfp(tstr, temp, 2); + len = fmt_s16_dfp(tstr, temp, -2); tstr[len] = '\0'; - len = fmt_s16_dfp(hstr, hum, 2); + len = fmt_s16_dfp(hstr, hum, -2); hstr[len] = '\0'; printf("Reading: T: %s °C RH: %s %%\n", tstr, hstr); diff --git a/tests/driver_lis2dh12/main.c b/tests/driver_lis2dh12/main.c index 0f8721c61e..ad7255e739 100644 --- a/tests/driver_lis2dh12/main.c +++ b/tests/driver_lis2dh12/main.c @@ -59,7 +59,7 @@ int main(void) /* format data */ for (int i = 0; i < 3; i++) { - size_t len = fmt_s16_dfp(str_out[i], data[i], 3); + size_t len = fmt_s16_dfp(str_out[i], data[i], -3); str_out[i][len] = '\0'; } -- GitLab