Skip to content

Commit

Permalink
Allow to specify preamble length
Browse files Browse the repository at this point in the history
  • Loading branch information
sh123 committed Mar 15, 2023
1 parent 8c8b578 commit b5a8d02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define CFG_LORA_PWR 10
#define CFG_LORA_CRC 1
#define CFG_LORA_EXPLICIT true
#define CFG_LORA_PREAMBLE 8

// lora pinouts
#define CFG_LORA_PIN_NSS 5
Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ void setupRadio(long loraFreq, long bw, int sf, int cr, int pwr, int sync, int c
else
radio_.implicitHeader(0xff);
radio_.setCRC(crcBytes);
radio_.setPreambleLength(CFG_LORA_PREAMBLE);
radio_.setDio0Action(isrRxDataAvailable);

// start lora receive
Expand Down

0 comments on commit b5a8d02

Please sign in to comment.