Define maximum AX.25 payload size

pull/15/head
sh123 2021-02-02 11:21:13 +02:00
rodzic 014fd6b045
commit 266816262d
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -229,7 +229,7 @@ void Service::onAprsisDataAvailable()
bool Service::sendAX25ToLora(const AX25::Payload &payload)
{
byte buf[512];
byte buf[CfgMaxAX25PayloadSize];
int bytesWritten = payload.ToBinary(buf, sizeof(buf));
if (bytesWritten <= 0) {
Serial.println("Failed to serialize payload");

Wyświetl plik

@ -102,6 +102,7 @@ private:
const int CfgPollDelayMs = 5;
const int CfgLoraTxQueueSize = 4096;
const int CfgWiFiConnRetryMaxTimes = 10;
const int CfgMaxAX25PayloadSize = 512;
// csma paramters, use lower value for high traffic, use 255 for real time
const long CfgCsmaPersistence = 100;