diff options
author | Erich Eckner <git@eckner.net> | 2019-11-04 20:08:08 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-11-04 20:08:08 +0100 |
commit | 6af672d8d338e290e65d557231362f34e0e4e8f5 (patch) | |
tree | 274e03aea22c6d0d91a026c6a8aad3e60ed28e1b /input_gadgets.c | |
parent | e6860732861a69ddd20f669dc8f2594dccf6218b (diff) | |
download | anzeige-6af672d8d338e290e65d557231362f34e0e4e8f5.tar.xz |
input_gadgets.c: fix sign, optimize TP-warning
Diffstat (limited to 'input_gadgets.c')
-rw-r--r-- | input_gadgets.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/input_gadgets.c b/input_gadgets.c index 6fed43f..5c7376e 100644 --- a/input_gadgets.c +++ b/input_gadgets.c @@ -1041,10 +1041,10 @@ char *gadgets_retrieve_humidity(char *output, int max_len, double fh_temperature humidity *= maximale_luftfeuchte(temperature); fh_humidity *= maximale_luftfeuchte(fh_temperature); - if ((output + max_len - ende > 0) && (temperature <= taupunkt(fh_humidity)-2)) - ende += snprintf(ende, max_len, "!TP(a) %.1f K; ", taupunkt(fh_humidity) - temperature); - if ((output + max_len - ende > 0) && (temperature <= taupunkt(humidity)-2)) - ende += snprintf(ende, max_len, "!TP(i) %.1f K; ", taupunkt(humidity) - temperature); + if ((output + max_len - ende > 0) && (temperature <= taupunkt(fh_humidity)+2)) + ende += snprintf(ende, max_len, "!TPa %.1f K; ", taupunkt(fh_humidity) - temperature); + if ((output + max_len - ende > 0) && (temperature <= taupunkt(humidity)+2)) + ende += snprintf(ende, max_len, "!TPi %.1f K; ", taupunkt(humidity) - temperature); if (output + max_len - ende > 0) ende += snprintf(ende, max_len, "%.0f %%", humidity * 100 / fh_humidity); free(chunk.memory); |