kopia lustrzana https://github.com/sh123/esp32_loraprs
Increased lora timeout
rodzic
4afb1cfd2b
commit
0885fde3ec
|
@ -310,7 +310,7 @@ void Service::onLoraDataAvailable(int packetSize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Serial.println("Invalid or unsupported payload from LoRA");
|
Serial.println("Skipping non-AX25 payload");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,6 @@ void Service::kissResetState()
|
||||||
|
|
||||||
bool Service::loraBeginPacketAndWait()
|
bool Service::loraBeginPacketAndWait()
|
||||||
{
|
{
|
||||||
bool canSend = false;
|
|
||||||
for (int i = 0; i < CfgLoraTxWaitMs; i++) {
|
for (int i = 0; i < CfgLoraTxWaitMs; i++) {
|
||||||
if (LoRa.beginPacket() == 1) {
|
if (LoRa.beginPacket() == 1) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -353,6 +352,7 @@ void Service::onBtDataAvailable()
|
||||||
if (rxByte != KissMarker::Fend) {
|
if (rxByte != KissMarker::Fend) {
|
||||||
if (rxByte == KissCmd::Data) {
|
if (rxByte == KissCmd::Data) {
|
||||||
if (!loraBeginPacketAndWait()) {
|
if (!loraBeginPacketAndWait()) {
|
||||||
|
Serial.println("LoRa buffer overflow, dropping packet");
|
||||||
kissResetState();
|
kissResetState();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ private:
|
||||||
const String CfgLoraprsVersion = "LoRAPRS 0.1";
|
const String CfgLoraprsVersion = "LoRAPRS 0.1";
|
||||||
|
|
||||||
const int CfgPollDelayMs = 5;
|
const int CfgPollDelayMs = 5;
|
||||||
const int CfgLoraTxWaitMs = 500;
|
const int CfgLoraTxWaitMs = 2000;
|
||||||
|
|
||||||
// tx when lower than this value from random 0..255
|
// tx when lower than this value from random 0..255
|
||||||
// use lower value for high traffic, use 255 for real time
|
// use lower value for high traffic, use 255 for real time
|
||||||
|
|
Ładowanie…
Reference in New Issue