diff --git a/firmware/application/capture_app.cpp b/firmware/application/capture_app.cpp index 97ca6ec7..617d4e6b 100644 --- a/firmware/application/capture_app.cpp +++ b/firmware/application/capture_app.cpp @@ -24,6 +24,8 @@ #include "portapack.hpp" using namespace portapack; +#include "file.hpp" + #include "utility.hpp" namespace ui { @@ -103,7 +105,12 @@ void CaptureAppView::on_start_stop() { capture_thread.reset(); button_start_stop.set_bitmap(&bitmap_record); } else { - capture_thread = std::make_unique("baseband.c16"); + const auto filename = next_filename_matching_pattern("BBD_????.C16"); + if( filename.empty() ) { + return; + } + + capture_thread = std::make_unique(filename); button_start_stop.set_bitmap(&bitmap_stop); } }