tnc2 converter bug fix

pull/29/head
Piotr Wilkon 2023-09-04 11:32:41 +02:00
rodzic 25a7125932
commit 08baecee8a
3 zmienionych plików z 10 dodań i 4 usunięć

Wyświetl plik

@ -3,6 +3,7 @@
* none
## Bug fixes
* RX buffer pointers bug fix
* AX.25 to TNC2 converter bug with non-UI frames
## Other
* New KISS handling method to support long and multiple frames
## Known bugs

Wyświetl plik

@ -146,11 +146,16 @@ static void sendTNC2ToUart(Uart *uart, uint8_t *from, uint16_t len)
}
UartSendByte(uart, ':'); //separator
UartSendByte(uart, ':'); //separator
nextPathEl += 2; //skip Control and PID
if((from[nextPathEl] & 0b11101111) == 0b00000011) //check if UI packet
{
nextPathEl += 2; //skip Control and PID
UartSendString(uart, &(from[nextPathEl]), len - nextPathEl); //send information field
UartSendString(uart, &(from[nextPathEl]), len - nextPathEl); //send information field
}
else
UartSendString(uart, "<not UI packet>", 0);
UartSendByte(uart, 0); //terminate with NULL
}

Wyświetl plik

@ -51,7 +51,7 @@ void KissParse(Uart *port, uint8_t data)
{
if(data == 0xC0) //frame end marker
{
if(port->kissBufferHead < 17) //command+source+destination+PID+Control=17
if(port->kissBufferHead < 16) //command+source+destination+Control=16
{
port->kissBufferHead = 0;
return;