From 46d4c919fb5c5bbc0af7969c46e8ceaf56e56a42 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Wed, 11 May 2016 12:07:58 -0700 Subject: [PATCH] Show SD card capture time remaining even when not capturing. --- firmware/application/ui_record_view.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firmware/application/ui_record_view.cpp b/firmware/application/ui_record_view.cpp index 6cf4c7a3..6d423184 100644 --- a/firmware/application/ui_record_view.cpp +++ b/firmware/application/ui_record_view.cpp @@ -246,7 +246,9 @@ void RecordView::on_tick_second() { const auto dropped_percent = std::min(99U, capture_thread->state().dropped_percent()); const auto s = to_string_dec_uint(dropped_percent, 2, ' ') + "\%"; text_record_dropped.set(s); + } + if( sampling_rate ) { const auto space_info = std::filesystem::space(""); const uint32_t bytes_per_second = file_type == FileType::WAV ? (sampling_rate * 2) : (sampling_rate * 4); const uint32_t available_seconds = space_info.free / bytes_per_second;