Added more modes
Added more modes, compatible to the old '300bps' mode but with different correction rates.
This commit is contained in:
parent
3d4a25b43c
commit
bf4f564701
|
|
@ -56,8 +56,8 @@
|
||||||
const byte TXLED = 4; //pin number for LED on TX Tracker
|
const byte TXLED = 4; //pin number for LED on TX Tracker
|
||||||
/* Original LORA32 V2.1 Setup
|
/* Original LORA32 V2.1 Setup
|
||||||
#elif LORA32_21
|
#elif LORA32_21
|
||||||
#define I2C_SDA 4
|
#define I2C_SDA 21
|
||||||
#define I2C_SCL 15
|
#define I2C_SCL 22
|
||||||
#define BUTTON 2 //pin number for BUTTO
|
#define BUTTON 2 //pin number for BUTTO
|
||||||
#define BUZZER 13 // enter your buzzer pin gpio
|
#define BUZZER 13 // enter your buzzer pin gpio
|
||||||
const byte TXLED = 4; //pin number for LED on TX Tracker
|
const byte TXLED = 4; //pin number for LED on TX Tracker
|
||||||
|
|
@ -384,7 +384,19 @@ void loraSend(byte lora_LTXPower, float lora_FREQ, const String &message) {
|
||||||
if(lora_speed==1200){
|
if(lora_speed==1200){
|
||||||
rf95.setModemConfig(BG_RF95::Bw125Cr47Sf512);
|
rf95.setModemConfig(BG_RF95::Bw125Cr47Sf512);
|
||||||
}
|
}
|
||||||
else{
|
else if(lora_speed==610){
|
||||||
|
rf95.setModemConfig(BG_RF95::Bw125Cr48Sf1024);
|
||||||
|
}
|
||||||
|
else if(lora_speed==180){
|
||||||
|
rf95.setModemConfig(BG_RF95::Bw125Cr48Sf4096);
|
||||||
|
}
|
||||||
|
else if(lora_speed==210){
|
||||||
|
rf95.setModemConfig(BG_RF95::Bw125Cr47Sf4096);
|
||||||
|
}
|
||||||
|
else if(lora_speed==240){
|
||||||
|
rf95.setModemConfig(BG_RF95::Bw125Cr46Sf4096);
|
||||||
|
}
|
||||||
|
else {
|
||||||
rf95.setModemConfig(BG_RF95::Bw125Cr45Sf4096);
|
rf95.setModemConfig(BG_RF95::Bw125Cr45Sf4096);
|
||||||
}
|
}
|
||||||
rf95.setFrequency(lora_FREQ);
|
rf95.setFrequency(lora_FREQ);
|
||||||
|
|
@ -927,10 +939,24 @@ void setup(){
|
||||||
batt_read();
|
batt_read();
|
||||||
writedisplaytext("LoRa-APRS","","Init:","ADC OK!","BAT: "+String(BattVolts,2),"");
|
writedisplaytext("LoRa-APRS","","Init:","ADC OK!","BAT: "+String(BattVolts,2),"");
|
||||||
|
|
||||||
if(lora_speed==1200)
|
if(lora_speed==1200){
|
||||||
rf95.setModemConfig(BG_RF95::Bw125Cr47Sf512);
|
rf95.setModemConfig(BG_RF95::Bw125Cr47Sf512);
|
||||||
else
|
}
|
||||||
|
else if(lora_speed==610){
|
||||||
|
rf95.setModemConfig(BG_RF95::Bw125Cr48Sf1024);
|
||||||
|
}
|
||||||
|
else if(lora_speed==180){
|
||||||
|
rf95.setModemConfig(BG_RF95::Bw125Cr48Sf4096);
|
||||||
|
}
|
||||||
|
else if(lora_speed==210){
|
||||||
|
rf95.setModemConfig(BG_RF95::Bw125Cr47Sf4096);
|
||||||
|
}
|
||||||
|
else if(lora_speed==240){
|
||||||
|
rf95.setModemConfig(BG_RF95::Bw125Cr46Sf4096);
|
||||||
|
}
|
||||||
|
else {
|
||||||
rf95.setModemConfig(BG_RF95::Bw125Cr45Sf4096);
|
rf95.setModemConfig(BG_RF95::Bw125Cr45Sf4096);
|
||||||
|
}
|
||||||
|
|
||||||
Serial.printf("LoRa Speed:\t%d\n", lora_speed);
|
Serial.printf("LoRa Speed:\t%d\n", lora_speed);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue