mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-12 07:49:32 -05:00
Add second tick handler for CaptureThread.
This commit is contained in:
parent
8188b44439
commit
11d15ec5b5
@ -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);
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "bitmap.hpp"
|
||||
|
||||
#include "capture_thread.hpp"
|
||||
#include "signal.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
@ -57,7 +58,10 @@ private:
|
||||
|
||||
std::unique_ptr<CaptureThread> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user