kopia lustrzana https://github.com/sh123/esp32_loraprs
Tune frequency to corrected one
rodzic
6c2e815042
commit
7dc76d399c
|
@ -11,8 +11,10 @@
|
|||
#ifdef LORAPRS_CLIENT
|
||||
// calibrate client based on server frequency drift report
|
||||
#define LORAPRS_FREQ 433.775E6
|
||||
//#define LORAPRS_FREQ 433.7688E6
|
||||
#else
|
||||
#define LORAPRS_FREQ 433.775E6
|
||||
//#define LORAPRS_FREQ 433.770E6
|
||||
#endif
|
||||
|
||||
#ifdef LORAPRS_CLIENT
|
||||
|
@ -24,11 +26,12 @@
|
|||
#define LORAPRS_FREQ_CORR false
|
||||
#else
|
||||
#define LORAPRS_BT_NAME ""
|
||||
#define LORAPRS_WIFI_SSID "<mywifi>"
|
||||
#define LORAPRS_WIFI_KEY "<key>"
|
||||
#define LORAPRS_WIFI_SSID "<your access point name>"
|
||||
#define LORAPRS_WIFI_KEY "<your access point key>"
|
||||
#define LORAPRS_LOGIN "NOCALL-0"
|
||||
#define LORAPRS_PASS "00000"
|
||||
#define LORAPRS_PASS "12345"
|
||||
#define LORAPRS_FREQ_CORR false
|
||||
//#define LORAPRS_FREQ_CORR true
|
||||
#endif
|
||||
|
||||
LoraPrs loraPrs(
|
||||
|
|
|
@ -144,7 +144,7 @@ String LoraPrs::decodeCall(byte *rxPtr)
|
|||
ssid = (*ptr >> 1);
|
||||
|
||||
String result = String((char*)callsign);
|
||||
if (ssid >= '0' && ssid <= '9') {
|
||||
if (result.length() > 0 && ssid >= '0' && ssid <= '9') {
|
||||
result += String("-") + String(ssid);
|
||||
}
|
||||
return result;
|
||||
|
@ -159,7 +159,7 @@ String LoraPrs::convertAX25ToAprs(byte *rxPayload, int payloadLength, const Stri
|
|||
rxPtr += 7;
|
||||
|
||||
srcCall = decodeCall(rxPtr);
|
||||
rxPtr += 7;
|
||||
rxPtr += 7;
|
||||
|
||||
if ((rxPayload[13] & 1) == 0) {
|
||||
rptFirst = decodeCall(rxPtr);
|
||||
|
@ -242,8 +242,10 @@ void LoraPrs::onLoraReceived(int packetSize)
|
|||
String(frequencyError) +
|
||||
String("Hz");
|
||||
|
||||
if (autoCorrectFreq_)
|
||||
if (autoCorrectFreq_) {
|
||||
loraFreq_ -= frequencyError;
|
||||
LoRa.setFrequency(loraFreq_);
|
||||
}
|
||||
|
||||
String aprsMsg = convertAX25ToAprs(rxBuf, rxBufIndex, signalReport);
|
||||
|
||||
|
|
|
@ -69,6 +69,8 @@ private:
|
|||
|
||||
const int CfgBw = 125e3;
|
||||
const byte CfgSpread = 12;
|
||||
//const int CfgBw = 20e3;
|
||||
//const byte CfgSpread = 9;
|
||||
const byte CfgCodingRate = 7;
|
||||
const byte CfgSync = 0xf3;
|
||||
const byte CfgPower = 20;
|
||||
|
|
Ładowanie…
Reference in New Issue