From 60b73d5ccd1bf85abc9a105f9b90d56299ba1ed1 Mon Sep 17 00:00:00 2001 From: jgromes Date: Mon, 12 Dec 2022 21:07:35 +0100 Subject: [PATCH] [Pager] Implemented inversion for receive (#641) --- src/protocols/Pager/Pager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/protocols/Pager/Pager.cpp b/src/protocols/Pager/Pager.cpp index 01fbbe98..086dcf38 100644 --- a/src/protocols/Pager/Pager.cpp +++ b/src/protocols/Pager/Pager.cpp @@ -469,6 +469,11 @@ uint32_t PagerClient::read() { codeWord |= (uint32_t)_phy->read() << 8; codeWord |= (uint32_t)_phy->read(); + // check if we need to invert bits + if(inv) { + codeWord = ~codeWord; + } + // TODO BCH error correction here return(codeWord); }