mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Invert TPMS Manchester decoding, fix dependent CRC/checksums.
This commit is contained in:
parent
5e6a76dfe7
commit
bd0ec913f5
@ -63,9 +63,9 @@ size_t Packet::crc_valid_length() const {
|
|||||||
bytes[i] = reader_.read(i * 8, 8);
|
bytes[i] = reader_.read(i * 8, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t checksum = 6;
|
uint32_t checksum = 0;
|
||||||
CRC<uint8_t> crc_72 { 0x01, 0xff };
|
CRC<uint8_t> crc_72 { 0x01, 0x00 };
|
||||||
CRC<uint8_t> crc_80 { 0x01, 0xff };
|
CRC<uint8_t> crc_80 { 0x01, 0x00 };
|
||||||
|
|
||||||
for(size_t i=0; i<bytes.size(); i++) {
|
for(size_t i=0; i<bytes.size(); i++) {
|
||||||
const uint32_t byte_mask = 1 << i;
|
const uint32_t byte_mask = 1 << i;
|
||||||
|
@ -123,7 +123,7 @@ public:
|
|||||||
constexpr Packet(
|
constexpr Packet(
|
||||||
const baseband::Packet& packet
|
const baseband::Packet& packet
|
||||||
) : packet_ { packet },
|
) : packet_ { packet },
|
||||||
decoder_ { packet_, 1 },
|
decoder_ { packet_, 0 },
|
||||||
reader_ { decoder_ }
|
reader_ { decoder_ }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user