POCSAG: decoder fixes, serial output, TX polarity cleanup (#3130)

RX: fix address/batch-boundary handling, add numeric continuation,
add heuristic type detection toggle, pass inverted polarity flag,
stream decoded messages over USB serial.

TX: rename phase to polarity (Standard/Inverted), fix function
validation (&&→||), fix serial shell payload read (offset tracking,
31-byte cap, preserve msglen).

Decoder: remove color escapes from output (plain text for all
consumers), guard count_alpha_fill against empty string, keep
numeric_len across continuation batches.

Serial format: POCSAG <baud> <addr> <func> <pol> <type> "<msg>" hex:<hex>
Quote escaping for embedded " and \\ in alpha messages.
This commit is contained in:
VasylSamoilov
2026-04-10 09:35:43 +03:00
committed by GitHub
parent fc18992442
commit dd006b4830
11 changed files with 549 additions and 92 deletions
+3
View File
@@ -153,6 +153,9 @@ class CodewordExtractor {
/* Returns true if the batch has as sync frame. */
bool has_sync() const { return has_sync_; }
/* Returns true if the signal was received with inverted polarity. */
bool inverted() const { return inverted_; }
private:
/* Sync frame codeword. */
static constexpr uint32_t sync_codeword = 0x7cd215d8;