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:
parent
a7c3aad8ea
commit
4333a29a41
@ -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",
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user