Skip to content

Commit

Permalink
Merge pull request #13 from faridfarhan28/master
Browse files Browse the repository at this point in the history
Add manual FREQ, SF, CR, BW config
  • Loading branch information
peterus authored Feb 19, 2021
2 parents 7991d81 + 5c6c29d commit 1ad85c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/LoRa_APRS_Tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,17 @@ void setup_lora()
LoRa.setPins(LORA_CS, LORA_RST, LORA_IRQ);
Serial.println("[INFO] Set LoRa pins!");

long freq = 433775000;
long freq = FREQ_SET;
Serial.print("[INFO] frequency: ");
Serial.println(freq);
if (!LoRa.begin(freq)) {
Serial.println("[ERROR] Starting LoRa failed!");
show_display("ERROR", "Starting LoRa failed!");
while (1);
}
LoRa.setSpreadingFactor(12);
LoRa.setSignalBandwidth(125E3);
LoRa.setCodingRate4(5);
LoRa.setSpreadingFactor(SF_SET);
LoRa.setSignalBandwidth(BW_SET);
LoRa.setCodingRate4(CR_SET);
LoRa.enableCrc();

LoRa.setTxPower(20);
Expand Down
6 changes: 6 additions & 0 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
#define SYMBOL_CODE ">"
#define SYMBOL_OVERLAY "/"

// Freq and Mode Setup - 2021-02-17 YC1HVZ
#define FREQ_SET 433775E3 //set freq in KHz XxxXxxE3 6 digit. E3 is KHz
#define SF_SET 12 //Spreading Factor
#define CR_SET 5 //Coding Rate
#define BW_SET 125E3 //Bandwith -> E3 is khz

// SMART BEACONING PARAMETERS - 2020-11-22 DJ1AN
#define SB_ACTIVE // uncomment to enable Smart Beaconing
#define SB_TURN_MIN 25 // enter turn angle for smart direction depending beaconing (default=20)
Expand Down

0 comments on commit 1ad85c3

Please sign in to comment.