diff options
author | Erich Eckner <git@eckner.net> | 2019-09-24 09:18:26 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-24 09:18:26 +0200 |
commit | 5a5bb02d01fce26195cff8e78e2d106b770c6507 (patch) | |
tree | 7296c39ce49486cf754b72054011d5b8a4b30baf /anzeige.c | |
parent | 973ea982a7c50a53b6437c54505164f73ccfcc96 (diff) | |
download | anzeige-5a5bb02d01fce26195cff8e78e2d106b770c6507.tar.xz |
humidity: wip
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); |