mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-29 09:39:12 -04:00
Add basic ERT (OOK) utility meter reception.
Extracted the Manchester formatting function for use in ERT, now also returns an indication of bits in error.
This commit is contained in:
parent
0c36a74351
commit
82ff45860e
8 changed files with 329 additions and 8 deletions
|
@ -46,6 +46,7 @@ public:
|
|||
TPMSPacket = 6,
|
||||
Shutdown = 8,
|
||||
AISPacket = 7,
|
||||
ERTPacket = 9,
|
||||
MAX
|
||||
};
|
||||
|
||||
|
@ -240,6 +241,22 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
struct ERTPacket {
|
||||
uint64_t preamble { 0 };
|
||||
std::bitset<1024> payload;
|
||||
size_t bits_received { 0 };
|
||||
};
|
||||
|
||||
class ERTPacketMessage : public Message {
|
||||
public:
|
||||
constexpr ERTPacketMessage(
|
||||
) : Message { ID::ERTPacket }
|
||||
{
|
||||
}
|
||||
|
||||
ERTPacket packet;
|
||||
};
|
||||
|
||||
class MessageHandlerMap {
|
||||
public:
|
||||
using MessageHandler = std::function<void(Message* const p)>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue