more work on debugging the pager decoder

This commit is contained in:
AlexandreRouma
2024-02-02 22:52:19 +01:00
parent 7ab743d05b
commit a08d2a0f85
4 changed files with 91 additions and 18 deletions

View File

@ -15,9 +15,12 @@ const char* msgTypes[] = {
"Alphanumeric",
};
#define BAUDRATE 2400
#define SAMPLERATE (BAUDRATE*10)
class POCSAGDecoder : public Decoder {
public:
POCSAGDecoder(const std::string& name, VFOManager::VFO* vfo) : diag(0.6, 2400) {
POCSAGDecoder(const std::string& name, VFOManager::VFO* vfo) : diag(0.6, BAUDRATE) {
this->name = name;
this->vfo = vfo;
@ -28,9 +31,9 @@ public:
// Init DSP
vfo->setBandwidthLimits(12500, 12500, true);
vfo->setSampleRate(24000, 12500);
dsp.init(vfo->output, 24000, 2400);
reshape.init(&dsp.soft, 2400.0, (2400 / 30.0) - 2400.0);
vfo->setSampleRate(SAMPLERATE, 12500);
dsp.init(vfo->output, SAMPLERATE, BAUDRATE);
reshape.init(&dsp.soft, BAUDRATE, (BAUDRATE / 30.0) - BAUDRATE);
dataHandler.init(&dsp.out, _dataHandler, this);
diagHandler.init(&reshape.out, _diagHandler, this);
@ -49,6 +52,10 @@ public:
// TODO
}
if (ImGui::Button("Detune")) {
dsp.detune();
}
ImGui::FillWidth();
diag.draw();
}