1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

tests/drivers: adapt to changed fmt_s16_dfp semantics

This commit is contained in:
Hauke Petersen 2018-01-22 17:11:42 +01:00
parent a7c3aad8ea
commit 4333a29a41
3 changed files with 5 additions and 5 deletions

View File

@ -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",

View File

@ -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);

View File

@ -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';
}