mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-01 11:06:30 -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
|
@ -412,7 +412,7 @@ bool pocsag_decode_batch(const POCSAGPacket& batch, POCSAGState& state) {
|
|||
state.ascii_idx -= 7;
|
||||
char ascii_char = (state.ascii_data >> state.ascii_idx) & 0x7F;
|
||||
|
||||
// Bottom's up (reverse the bits).
|
||||
// Reverse the bits. (TODO: __RBIT?)
|
||||
ascii_char = (ascii_char & 0xF0) >> 4 | (ascii_char & 0x0F) << 4; // 01234567 -> 45670123
|
||||
ascii_char = (ascii_char & 0xCC) >> 2 | (ascii_char & 0x33) << 2; // 45670123 -> 67452301
|
||||
ascii_char = (ascii_char & 0xAA) >> 2 | (ascii_char & 0x55); // 67452301 -> 76543210
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue