Browse Source

Work autoswitch RX

KISS_TNC
US1GHQ 1 month ago
parent
commit
2c4ebf7b2d
  1. 20
      include/version.h
  2. 3
      lib/KISS_TO_TNC2/KISS_TO_PKT.cpp
  3. 2
      lib/KISS_TO_TNC2/KISS_TO_PKT.h
  4. 4
      src/taskTNC.cpp

20
include/version.h

@ -1,10 +1,10 @@
#ifndef BUILD_NUMBER
#define BUILD_NUMBER "20"
#endif
#ifndef VERSION
#define VERSION "v0.3.2.20-adf79c8 - 2021-09-13 11:57:57.529546"
#endif
#ifndef VERSION_SHORT
#define VERSION_SHORT "v0.3.2.20-adf79c8"
#endif
#ifndef BUILD_NUMBER
#define BUILD_NUMBER "226"
#endif
#ifndef VERSION
#define VERSION "v0.3.2.226-0b37f35 - 2021-09-13 19:07:57.484848"
#endif
#ifndef VERSION_SHORT
#define VERSION_SHORT "v0.3.2.226-0b37f35"
#endif

3
lib/KISS_TO_TNC2/KISS_TO_PKT.cpp

@ -32,7 +32,8 @@ String decapsulateKISS_pkt(const String &frame);
String encode_kiss_pkt(const String &tnc2FormattedFrame, bool &pktFrame)
{
String TNC2Frame = "";
pktFrame = tnc2FormattedFrame.charAt(2) == R_PKT;
// Serial.print(tnc2FormattedFrame);
pktFrame = tnc2FormattedFrame.charAt(1) == R_PKT;
if (pktFrame) {
String ax25Frame = encapsulateKISS_pkt(tnc2FormattedFrame, CMD_DATA);
TNC2Frame += ax25Frame;

2
lib/KISS_TO_TNC2/KISS_TO_PKT.h

@ -3,7 +3,7 @@
//Data control frames, ported from Direwolf
#define T_PKT 0xaa
#define R_PKT 0x01
#define R_PKT 0xa6
//END
//PACKET MODE
String encode_kiss_pkt(const String& tnc2FormattedFrame, bool &pktFrame);

4
src/taskTNC.cpp

@ -102,8 +102,9 @@ void handleKISSData(char character, int bufferIndex) {
if (xQueueReceive(tncReceivedQueue, &loraReceivedFrameString, (1 / portTICK_PERIOD_MS)) == pdPASS) {
bool isPacketFrame = false;
if (isPacketFrame) {
const String &kissEncoded_pkt = encode_kiss_pkt(*loraReceivedFrameString, isPacketFrame);
const String &kissEncoded = encode_kiss(*loraReceivedFrameString);
if (isPacketFrame) {
Serial.print(kissEncoded_pkt);
#ifdef ENABLE_BLUETOOTH
if (SerialBT.hasClient()){
@ -121,7 +122,6 @@ void handleKISSData(char character, int bufferIndex) {
}
else
{
const String &kissEncoded = encode_kiss(*loraReceivedFrameString);
Serial.print(kissEncoded);
#ifdef ENABLE_BLUETOOTH
if (SerialBT.hasClient()){

Loading…
Cancel
Save