From f38fca168e3e081b1067aae9a7c8da34922bcd94 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Wed, 20 Apr 2016 10:23:59 -0700 Subject: [PATCH] Use sequential file naming for baseband capture files. --- firmware/application/capture_app.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); } }