beginning of pager decoder

This commit is contained in:
AlexandreRouma
2024-01-31 23:34:40 +01:00
parent 4b6835141e
commit 3fc893568a
9 changed files with 571 additions and 2 deletions

View File

@ -0,0 +1,32 @@
#pragma once
#include "../decoder.h"
#include <utils/optionlist.h>
#include <gui/widgets/symbol_diagram.h>
#include <gui/style.h>
class POCSAGDecoder : public Decoder {
public:
POCSAGDecoder() : diag(0.6, 2400) {
// Define baudrate options
baudrates.define(512, "512 Baud", 512);
baudrates.define(1200, "1200 Baud", 1200);
baudrates.define(2400, "2400 Baud", 2400);
}
void showMenu() {
ImGui::LeftLabel("Baudrate");
ImGui::FillWidth();
if (ImGui::Combo(("##pager_decoder_proto_" + name).c_str(), &brId, baudrates.txt)) {
// TODO
}
}
private:
std::string name;
ImGui::SymbolDiagram diag;
int brId = 2;
OptionList<int, int> baudrates;
};