Browse Source

tnc2 converter bug fix

pull/29/head
Piotr Wilkon 2 years ago
parent
commit
08baecee8a
3 changed files with 10 additions and 4 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +8
    -3
      Src/common.c
  3. +1
    -1
      Src/kiss.c

+ 1
- 0
CHANGELOG.md View File

@ -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


+ 8
- 3
Src/common.c View File

@ -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
}


+ 1
- 1
Src/kiss.c View File

@ -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;


Loading…
Cancel
Save