mirror of
https://github.com/thelsing/knx.git
synced 2025-01-16 00:08:16 +01:00
add some debug messages
This commit is contained in:
parent
aa05fa8418
commit
521076b7b9
@ -155,6 +155,8 @@ void TpUartDataLinkLayer::loop()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
uint8_t firstByte = SerialKNX.read();
|
uint8_t firstByte = SerialKNX.read();
|
||||||
|
SerialDBG.print("->");
|
||||||
|
SerialDBG.println(firstByte, HEX);
|
||||||
|
|
||||||
if (checkDataInd(firstByte))
|
if (checkDataInd(firstByte))
|
||||||
return;
|
return;
|
||||||
@ -225,6 +227,14 @@ bool TpUartDataLinkLayer::checkDataInd(uint8_t firstByte)
|
|||||||
}
|
}
|
||||||
len = payloadLength + 9;
|
len = payloadLength + 9;
|
||||||
|
|
||||||
|
SerialDBG.print("-> ");
|
||||||
|
for (int i = 0; i < len; i++)
|
||||||
|
{
|
||||||
|
SerialDBG.print(buffer[i], HEX);
|
||||||
|
SerialDBG.print(" ");
|
||||||
|
}
|
||||||
|
SerialDBG.println();
|
||||||
|
|
||||||
const uint8_t queueLength = 5;
|
const uint8_t queueLength = 5;
|
||||||
static uint8_t buffers[queueLength][bufferSize];
|
static uint8_t buffers[queueLength][bufferSize];
|
||||||
static uint16_t bufferLengths[queueLength];
|
static uint16_t bufferLengths[queueLength];
|
||||||
@ -448,6 +458,14 @@ bool TpUartDataLinkLayer::enabled() const
|
|||||||
|
|
||||||
void TpUartDataLinkLayer::sendBytes(uint8_t* bytes, uint16_t length)
|
void TpUartDataLinkLayer::sendBytes(uint8_t* bytes, uint16_t length)
|
||||||
{
|
{
|
||||||
|
SerialDBG.print("<- ");
|
||||||
|
for (int i = 0; i < length; i++)
|
||||||
|
{
|
||||||
|
SerialDBG.print(bytes[i], HEX);
|
||||||
|
SerialDBG.print(" ");
|
||||||
|
}
|
||||||
|
SerialDBG.println();
|
||||||
|
|
||||||
uint8_t cmd[2];
|
uint8_t cmd[2];
|
||||||
|
|
||||||
for (int i = 0; i < length; i++)
|
for (int i = 0; i < length; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user