Change RX method for autoswitch

master
US1GHQ 2021-09-15 23:34:56 +03:00
parent dd653c75dc
commit e5a30a0687
3 changed files with 10 additions and 17 deletions

View File

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

View File

@ -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;
}
}
}
}
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) {
if (validateTNC2Frame(tnc2FormattedFrame)) {
String address = "";
bool dst_addres_written = false;
for (int p = 0; p <= tnc2FormattedFrame.indexOf(':'); p++) {

View File

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