Fix pxx1
This commit is contained in:
@@ -150,6 +150,17 @@ class StandardPxxTransport: public BitTransport, public PxxCrcMixin {
|
||||
addByteWithoutCrc(byte);
|
||||
};
|
||||
|
||||
void addRawByteWithoutCrc(uint8_t byte)
|
||||
{
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
if (byte & 0x80)
|
||||
BitTransport::addPart(1);
|
||||
else
|
||||
BitTransport::addPart(0);
|
||||
byte <<= 1;
|
||||
}
|
||||
}
|
||||
|
||||
void addByteWithoutCrc(uint8_t byte)
|
||||
{
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
@@ -187,6 +198,11 @@ class UartPxxTransport: public DataBuffer<uint8_t, 64>, public PxxCrcMixin {
|
||||
addWithByteStuffing(byte);
|
||||
}
|
||||
|
||||
void addRawByteWithoutCrc(uint8_t byte)
|
||||
{
|
||||
addByteWithoutCrc(byte);
|
||||
}
|
||||
|
||||
void addByteWithoutCrc(uint8_t byte)
|
||||
{
|
||||
*ptr++ = byte;
|
||||
|
||||
@@ -33,7 +33,7 @@ class Pxx1Pulses: public PxxPulses<PxxTransport>
|
||||
void addHead()
|
||||
{
|
||||
// send 7E, do not CRC
|
||||
PxxTransport::addByteWithoutCrc(0x7E);
|
||||
PxxTransport::addRawByteWithoutCrc(0x7E);
|
||||
}
|
||||
|
||||
void addCrc()
|
||||
|
||||
Reference in New Issue
Block a user