SatDump 2.0.0-alpha-520736c72
Loading...
Searching...
No Matches
fm_test.h
1#pragma once
2
3#include "dsp/agc/agc.h"
4#include "dsp/block.h"
5#include "dsp/device/dev.h"
6#include "dsp/device/options_displayer.h"
7#include "dsp/device/options_displayer_warper.h"
8#include "dsp/resampling/rational_resampler.h"
9#include "dsp/utils/blanker.h"
10#include "dsp/utils/quadrature_demod.h"
11#include "dsp/utils/vco.h"
12#include "handlers/handler.h"
13#include "utils/task_queue.h"
14#include <complex.h>
15#include <memory>
16
17namespace satdump
18{
19 namespace handlers
20 {
21 class FMTestHandler : public Handler
22 {
23 private:
24 TaskQueue taskq;
25
26 bool deviceRunning = false;
27 ndsp::DeviceInfo curDeviceI;
28 std::vector<ndsp::DeviceInfo> foundDevices;
29
30 std::shared_ptr<ndsp::DeviceBlock> dev;
31 std::shared_ptr<ndsp::OptDisplayerWarper> options_displayer_dev;
32
33 private:
34 std::shared_ptr<ndsp::Block> tx_audio_source;
35 std::shared_ptr<ndsp::RationalResamplerBlock<float>> tx_resamp;
36 std::shared_ptr<ndsp::VCOBlock> tx_vco;
37 std::shared_ptr<ndsp::BlankerBlock<complex_t>> tx_blanker;
38
39 std::shared_ptr<ndsp::AGCBlock<complex_t>> rx_agc;
40 std::shared_ptr<ndsp::RationalResamplerBlock<complex_t>> rx_resamp;
41 std::shared_ptr<ndsp::QuadratureDemodBlock> rx_quad;
42 std::shared_ptr<ndsp::Block> rx_audio_sink;
43
44 bool is_txing = false;
45
46 public:
47 FMTestHandler();
48 ~FMTestHandler();
49
50 // The Rest
51 void drawMenu();
52 void drawContents(ImVec2 win_size);
53
54 std::string getName() { return "FM Test"; }
55
56 std::string getID() { return "fm_test_handler"; }
57 };
58 } // namespace handlers
59} // namespace satdump
A simple thread pool running tasks sequentially in a single thread.
Definition task_queue.h:24
void drawMenu()
Render explorer menu left sidebar.
Definition fm_test.cpp:63
std::string getName()
Get this handler's readable name.
Definition fm_test.h:54
void drawContents(ImVec2 win_size)
Render explorer contents (center/left)
Definition fm_test.cpp:158
SatDump's handler base class.
Definition handler.h:32
Definition dev.h:12
A simple single-thread thread pool.