mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-10 16:49:36 +00:00
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:
@@ -1569,8 +1569,8 @@ class PocsagTosendMessage : public Message {
|
||||
constexpr PocsagTosendMessage(
|
||||
uint16_t baud = 1200,
|
||||
uint8_t type = 2,
|
||||
char function = 'D',
|
||||
char phase = 'N',
|
||||
char function = 'A',
|
||||
char polarity = 'S', /* 'S' = Standard (CCIR Rec. 584), 'I' = Inverted */
|
||||
uint8_t msglen = 0,
|
||||
uint8_t msg[31] = {0},
|
||||
uint64_t addr = 0)
|
||||
@@ -1578,15 +1578,15 @@ class PocsagTosendMessage : public Message {
|
||||
baud{baud},
|
||||
type{type},
|
||||
function{function},
|
||||
phase{phase},
|
||||
polarity{polarity},
|
||||
msglen{msglen},
|
||||
addr{addr} {
|
||||
memcpy(this->msg, msg, 31);
|
||||
}
|
||||
uint16_t baud = 1200;
|
||||
uint8_t type = 2;
|
||||
char function = 'D';
|
||||
char phase = 'N';
|
||||
char function = 'A';
|
||||
char polarity = 'S'; /* 'S' = Standard, 'I' = Inverted */
|
||||
uint8_t msglen = 0;
|
||||
uint8_t msg[31] = {0};
|
||||
uint64_t addr = 0;
|
||||
|
||||
Reference in New Issue
Block a user