From 42997ff6140f32ffc5ff3d36a94d307f0177641b Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Wed, 25 Jun 2025 17:08:38 -0400 Subject: [PATCH] ir upload: display free space instead of 'no data' --- watch-faces/io/irda_upload_face.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/watch-faces/io/irda_upload_face.c b/watch-faces/io/irda_upload_face.c index 76b8764d..56842342 100644 --- a/watch-faces/io/irda_upload_face.c +++ b/watch-faces/io/irda_upload_face.c @@ -67,7 +67,9 @@ bool irda_upload_face_loop(movement_event_t event, void *context) { char data[256]; size_t bytes_read = uart_read_instance(0, data, 256); watch_clear_display(); - watch_display_text_with_fallback(WATCH_POSITION_TOP, "IrDA", "IR"); + watch_set_indicator(WATCH_INDICATOR_ARROWS); + if (watch_rtc_get_date_time().unit.second % 4 < 2) watch_display_text_with_fallback(WATCH_POSITION_TOP, "IrDA", "IR"); + else watch_display_text_with_fallback(WATCH_POSITION_TOP, "FREE ", "DF"); if (bytes_read) { // data is in the following format, where S is Size, F is Filename and C is checksum: @@ -124,7 +126,9 @@ bool irda_upload_face_loop(movement_event_t event, void *context) { watch_display_text(WATCH_POSITION_BOTTOM, buf); } else { movement_force_led_off(); - watch_display_text(WATCH_POSITION_FULL, " no dat"); + char buf[7]; + snprintf(buf, 7, "%4ld b", filesystem_get_free_space()); + watch_display_text(WATCH_POSITION_BOTTOM, buf); } } break;