Browse Source

Change RX method for autoswitch

master
US1GHQ 1 month ago
parent
commit
e5a30a0687
  1. 6
      include/version.h
  2. 19
      lib/KISS_TO_TNC2/KISS_TO_TNC2.cpp
  3. 2
      src/taskTNC.cpp

6
include/version.h

@ -1,10 +1,10 @@
#ifndef BUILD_NUMBER
#define BUILD_NUMBER "191"
#define BUILD_NUMBER "201"
#endif
#ifndef VERSION
#define VERSION "v0.4.2.191- - 2021-09-15 22:11:52.858358"
#define VERSION "v0.4.2.201- - 2021-09-15 23:28:59.739585"
#endif
#ifndef VERSION_SHORT
#define VERSION_SHORT "v0.4.2.191-"
#define VERSION_SHORT "v0.4.2.201-"
#endif

19
lib/KISS_TO_TNC2/KISS_TO_TNC2.cpp

@ -39,19 +39,12 @@ String encode_kiss(const String &tnc2FormattedFrame, bool &pktFrame) {
String ax25Frame = "";
if (validateTNC2Frame(tnc2FormattedFrame)) {
for (int p = 0; p <= tnc2FormattedFrame.indexOf(':'); p++)
{
char currentChar = tnc2FormattedFrame.charAt(p);
if (currentChar == ':' || currentChar == '>' || currentChar == ',') {
if (!pktFrame && (currentChar == ',' || currentChar == ':'))
{
pktFrame = true;
}
}
}
}
if (pktFrame) {
if (validateTNC2Frame(tnc2FormattedFrame)) {
for (int p = 0; p <= tnc2FormattedFrame.indexOf("WIDE"); p++) { pktFrame = true;}
for (int p = 0; p <= tnc2FormattedFrame.indexOf("ECHO"); p++) { pktFrame = true;}
for (int p = 0; p <= tnc2FormattedFrame.indexOf("TRACE"); p++) { pktFrame = true;}
for (int p = 0; p <= tnc2FormattedFrame.indexOf("RELAY"); p++) { pktFrame = true;}
for (int p = 0; p <= tnc2FormattedFrame.indexOf("APRS"); p++) { pktFrame = true;}
if (pktFrame) {
String address = "";
bool dst_addres_written = false;
for (int p = 0; p <= tnc2FormattedFrame.indexOf(':'); p++) {

2
src/taskTNC.cpp

@ -94,7 +94,7 @@ void handleKISSData(char character, int bufferIndex) {
if (xQueueReceive(tncReceivedQueue, &loraReceivedFrameString, (1 / portTICK_PERIOD_MS)) == pdPASS) {
bool isPacketFrame = false;
const String &kissEncoded = encode_kiss(*loraReceivedFrameString, isPacketFrame);
Serial.print(kissEncoded);
// Serial.print(kissEncoded);
#ifdef ENABLE_BLUETOOTH
if (SerialBT.hasClient()){
SerialBT.print(kissEncoded);

Loading…
Cancel
Save