summaryrefslogtreecommitdiff
path: root/anzeige.c
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-09-24 09:18:26 +0200
committerErich Eckner <git@eckner.net>2019-09-24 09:18:26 +0200
commit5a5bb02d01fce26195cff8e78e2d106b770c6507 (patch)
tree7296c39ce49486cf754b72054011d5b8a4b30baf /anzeige.c
parent973ea982a7c50a53b6437c54505164f73ccfcc96 (diff)
downloadanzeige-5a5bb02d01fce26195cff8e78e2d106b770c6507.tar.xz
humidity: wip
Diffstat (limited to 'anzeige.c')
-rw-r--r--anzeige.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/anzeige.c b/anzeige.c
index 67a2046..311b4ac 100644
--- a/anzeige.c
+++ b/anzeige.c
@@ -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);