kopia lustrzana https://github.com/sh123/esp32_loraprs
Correct frequency when error is more than configuration value only
rodzic
b0acc6607c
commit
07801becbb
|
@ -269,7 +269,7 @@ void Service::onLoraDataAvailable(int packetSize)
|
|||
serialSend(Cmd::Data, rxBuf, rxBufIndex);
|
||||
long frequencyError = LoRa.packetFrequencyError();
|
||||
|
||||
if (config_.EnableAutoFreqCorrection) {
|
||||
if (config_.EnableAutoFreqCorrection && abs(frequencyError) > CfgFreqCorrMinHz) {
|
||||
config_.LoraFreq -= frequencyError;
|
||||
LoRa.setFrequency(config_.LoraFreq);
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@ private:
|
|||
const int CfgPollDelayMs = 5;
|
||||
const int CfgWiFiConnRetryMaxTimes = 10;
|
||||
const int CfgMaxAX25PayloadSize = 512;
|
||||
const int CfgFreqCorrMinHz = 150;
|
||||
|
||||
// csma parameters, overriden with KISS commands
|
||||
const long CfgCsmaPersistence = 100; // 255 for real time, lower for higher traffic
|
||||
|
|
Ładowanie…
Reference in New Issue