From e6860732861a69ddd20f669dc8f2594dccf6218b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 29 Oct 2019 17:12:00 +0100 Subject: input_gadgets.c: Taupunkt ab 2K warnen --- input_gadgets.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'input_gadgets.c') diff --git a/input_gadgets.c b/input_gadgets.c index 08b562b..6fed43f 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))) - ende += snprintf(ende, max_len, "!TP %.1f K; ", taupunkt(fh_humidity) - temperature); - if ((output + max_len - ende > 0) && (temperature <= taupunkt(humidity))) - ende += snprintf(ende, max_len, "!TP %.1f K; ", taupunkt(humidity) - 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) ende += snprintf(ende, max_len, "%.0f %%", humidity * 100 / fh_humidity); free(chunk.memory); -- cgit v1.2.3-54-g00ecf