mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-27 16:17:31 -04:00
POCSAG Processor Rewrite (#1437)
* WIP Refactoring * WordExtractor building * Fix buffer sizes and squelch execute * Move impls to cpp file * Baud indicator * WIP new bit extractor * New approach for bit extraction. * Code fit and finish * Fix case on button * Cleanup * Adjust rate miss threshold * Fix count bits error calculation.
This commit is contained in:
parent
9525738118
commit
31e8019642
13 changed files with 648 additions and 534 deletions
|
@ -52,6 +52,24 @@ class POCSAGLogger {
|
|||
|
||||
namespace ui {
|
||||
|
||||
class BaudIndicator : public Widget {
|
||||
public:
|
||||
BaudIndicator(Point position)
|
||||
: Widget{{position, {5, height}}} {}
|
||||
|
||||
void paint(Painter& painter) override;
|
||||
void set_rate(uint16_t rate) {
|
||||
if (rate != rate_) {
|
||||
rate_ = rate;
|
||||
set_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr uint8_t height = 16;
|
||||
uint16_t rate_ = 0;
|
||||
};
|
||||
|
||||
class BitsIndicator : public Widget {
|
||||
public:
|
||||
BitsIndicator(Point position)
|
||||
|
@ -247,10 +265,13 @@ class POCSAGAppView : public View {
|
|||
"0"};
|
||||
|
||||
BitsIndicator widget_bits{
|
||||
{9 * 7 + 6, 1 * 16 + 2}};
|
||||
{8 * 8 + 1, 1 * 16 + 2}};
|
||||
|
||||
FrameIndicator widget_frames{
|
||||
{9 * 8, 1 * 16 + 2}};
|
||||
{8 * 8 + 4, 1 * 16 + 2}};
|
||||
|
||||
BaudIndicator widget_baud{
|
||||
{8 * 9 + 1, 1 * 16 + 2}};
|
||||
|
||||
Button button_ignore_last{
|
||||
{10 * 8, 1 * 16, 12 * 8, 20},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue