diff --git a/firmware/application/capture_app.cpp b/firmware/application/capture_app.cpp index d5df1ee2..50a1d1f8 100644 --- a/firmware/application/capture_app.cpp +++ b/firmware/application/capture_app.cpp @@ -25,6 +25,7 @@ using namespace portapack; #include "file.hpp" +#include "time.hpp" #include "utility.hpp" @@ -77,9 +78,14 @@ CaptureAppView::CaptureAppView(NavigationView& nav) { }); receiver_model.set_baseband_bandwidth(baseband_bandwidth); receiver_model.enable(); + + signal_token_tick_second = time::signal_tick_second += [this]() { + this->on_tick_second(); + }; } CaptureAppView::~CaptureAppView() { + time::signal_tick_second -= signal_token_tick_second; receiver_model.disable(); } @@ -117,6 +123,11 @@ void CaptureAppView::on_record() { } } +void CaptureAppView::on_tick_second() { + if( capture_thread ) { + } +} + void CaptureAppView::on_tuning_frequency_changed(rf::Frequency f) { receiver_model.set_tuning_frequency(f); } diff --git a/firmware/application/capture_app.hpp b/firmware/application/capture_app.hpp index cb5ceeb0..4fb6414a 100644 --- a/firmware/application/capture_app.hpp +++ b/firmware/application/capture_app.hpp @@ -30,6 +30,7 @@ #include "bitmap.hpp" #include "capture_thread.hpp" +#include "signal.hpp" #include #include @@ -57,7 +58,10 @@ private: std::unique_ptr capture_thread; + SignalToken signal_token_tick_second; + void on_record(); + void on_tick_second(); void on_tuning_frequency_changed(rf::Frequency f); void on_lna_changed(int32_t v_db);