diff --git a/include/PacketTypes.h b/include/PacketTypes.h index 8d7109e..55b6837 100644 --- a/include/PacketTypes.h +++ b/include/PacketTypes.h @@ -41,6 +41,8 @@ struct Packet { uint16_t destination; PacketType type; PacketParameters parameters; + uint8_t rollingCode1; + uint8_t rollingCode2; }; diff --git a/src/PacketParser.cpp b/src/PacketParser.cpp index 2c3c51c..482af5b 100644 --- a/src/PacketParser.cpp +++ b/src/PacketParser.cpp @@ -13,6 +13,9 @@ bool PacketParser::parsePacket(const uint8_t *buffer, Packet& packet) packet.source = (uint16_t)(buffer[14] << 8 | buffer[15]); packet.destination = (uint16_t)(buffer[12] << 8 | buffer[13]); + packet.rollingCode1 = buffer[4]; + packet.rollingCode2 = buffer[11]; + if (buffer[16] == 0x52 && buffer[17] == 0x53) { packet.type = PacketType::STOP; packet.parameters = std::monostate{};