diff --git a/src/LoRa_APRS_Tracker.cpp b/src/LoRa_APRS_Tracker.cpp index 864bb1d..8d62fe2 100644 --- a/src/LoRa_APRS_Tracker.cpp +++ b/src/LoRa_APRS_Tracker.cpp @@ -49,7 +49,7 @@ TinyGPSPlus gps; OneButton userButton = OneButton(BUTTON_PIN, true, true); #endif -String versionDate = "2024.10.29"; +String versionDate = "2024.10.30"; uint8_t myBeaconsIndex = 0; int myBeaconsSize = Config.beacons.size(); diff --git a/src/kiss_protocol.h b/src/kiss_protocol.h new file mode 100644 index 0000000..7149bea --- /dev/null +++ b/src/kiss_protocol.h @@ -0,0 +1,23 @@ +#define DCD_ON 0x03 + +#define FEND 0xC0 +#define FESC 0xDB +#define TFEND 0xDC +#define TFESC 0xDD + +#define CMD_UNKNOWN 0xFE +#define CMD_DATA 0x00 +#define CMD_HARDWARE 0x06 + +#define HW_RSSI 0x21 + +#define CMD_ERROR 0x90 +#define ERROR_INITRADIO 0x01 +#define ERROR_TXFAILED 0x02 +#define ERROR_QUEUE_FULL 0x04 + +#define APRS_CONTROL_FIELD 0x03 +#define APRS_INFORMATION_FIELD 0xf0 + +#define HAS_BEEN_DIGIPITED_MASK 0b10000000 +#define IS_LAST_ADDRESS_POSITION_MASK 0b1 \ No newline at end of file diff --git a/src/msg_utils.cpp b/src/msg_utils.cpp index c5c8d76..7c34187 100644 --- a/src/msg_utils.cpp +++ b/src/msg_utils.cpp @@ -416,14 +416,7 @@ namespace MSG_Utils { lastReceivedPacket.message = lastReceivedPacket.message.substring(0, lastReceivedPacket.message.indexOf("\x3c\xff\x01")); } - if (check25SegBuffer(lastReceivedPacket.sender, lastReceivedPacket.message)) { - /*if (Config.bluetooth.type == 0 || Config.bluetooth.type == 2) { // agregar validador si cliente BLE esta conectado? - BLE_Utils::sendToPhone(packet.text.substring(3)); - } else { - #ifdef HAS_BT_CLASSIC - BLUETOOTH_Utils::sendPacket(packet.text.substring(3)); - #endif - }*/ + if (check25SegBuffer(lastReceivedPacket.sender, lastReceivedPacket.message)) { if (digirepeaterActive && lastReceivedPacket.addressee != currentBeacon->callsign) { String digiRepeatedPacket = APRSPacketLib::generateDigiRepeatedPacket(packet.text, currentBeacon->callsign, Config.path);