diff options
Diffstat (limited to 'anzeige.c')
-rw-r--r-- | anzeige.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -112,6 +112,17 @@ int main(int argc, char **argv) turn_off_display(); return EXIT_FAILURE; } + if (text_buffer + TEXT_BUFFER_LENGTH - text_buffer_end > 0) + text_buffer_end += snprintf(text_buffer_end, text_buffer + TEXT_BUFFER_LENGTH - text_buffer_end, "; "); + text_buffer_end = gadgets_retrieve_humidity(text_buffer_end, text_buffer + TEXT_BUFFER_LENGTH - text_buffer_end, temperature, humidity); + if (text_buffer_end == NULL) { + fprintf(stderr, "gadgets_retrieve_humidity failed\n"); + free(text_buffer); + turn_off_display(); + return EXIT_FAILURE; + } + printf("%s\n", text_buffer); + return 0; struct tm time_struct; memset(&time_struct, 0, sizeof(time_struct)); localtime_r(&next_update, &time_struct); |