Update RadioLib

This commit is contained in:
lewisxhe
2024-09-19 11:12:36 +08:00
parent 210367a171
commit 5794daa8aa
301 changed files with 115546 additions and 12703 deletions
@@ -96,7 +96,7 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while (true);
while (true) { delay(10); }
}
// when using one of the non-LoRa modules for SSTV
@@ -107,7 +107,16 @@ void setup() {
Serial.print(F("[SSTV] Initializing ... "));
// 0 Hz tone frequency: 434.0 MHz
// SSTV mode: Wrasse (SC2-180)
// correction factor: 0.95
state = sstv.begin(434.0, Wrasse);
if(state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while (true) { delay(10); }
}
// set correction factor
// NOTE: Due to different speeds of various platforms
// supported by RadioLib (Arduino Uno, ESP32 etc),
// and because SSTV is analog protocol, incorrect
@@ -116,13 +125,14 @@ void setup() {
// to adjust the length of timing pulses
// (lower number = shorter pulses).
// The value is usually around 0.95 (95%).
state = sstv.begin(434.0, Wrasse, 0.95);
Serial.print(F("[SSTV] Setting correction ... "));
state = sstv.setCorrection(0.95);
if(state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while(true);
while (true) { delay(10); }
}
// to help tune the receiver, SSTVClient can send
@@ -131,7 +141,7 @@ void setup() {
// (SSTV header "leader tone")
/*
sstv.idle();
while(true);
while (true) { delay(10); }
*/
}
@@ -12,6 +12,7 @@
- SX1231
- CC1101
- Si443x/RFM2x
- SX126x/LLCC68
NOTE: Some platforms (such as Arduino Uno)
might not be fast enough to correctly
@@ -42,7 +43,14 @@ SX1278 radio = new Module(10, 2, 9, 3);
//SX1278 radio = RadioShield.ModuleA;
// create AFSK client instance using the FSK module
// pin 5 is connected to SX1278 DIO2
// this requires connection to the module direct
// input pin, here connected to Arduino pin 5
// SX127x/RFM9x: DIO2
// RF69: DIO2
// SX1231: DIO2
// CC1101: GDO2
// Si443x/RFM2x: GPIO
// SX126x/LLCC68: DIO2
AFSKClient audio(&radio, 5);
// create SSTV client instance using the AFSK instance
@@ -95,7 +103,7 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while (true);
while (true) { delay(10); }
}
// when using one of the non-LoRa modules for SSTV
@@ -105,7 +113,16 @@ void setup() {
// initialize SSTV client
Serial.print(F("[SSTV] Initializing ... "));
// SSTV mode: Wrasse (SC2-180)
// correction factor: 0.95
state = sstv.begin(Wrasse);
if(state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while (true) { delay(10); }
}
// set correction factor
// NOTE: Due to different speeds of various platforms
// supported by RadioLib (Arduino Uno, ESP32 etc),
// and because SSTV is analog protocol, incorrect
@@ -114,20 +131,21 @@ void setup() {
// to adjust the length of timing pulses
// (lower number = shorter pulses).
// The value is usually around 0.95 (95%).
state = sstv.begin(Wrasse, 0.95);
Serial.print(F("[SSTV] Setting correction ... "));
state = sstv.setCorrection(0.95);
if(state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while(true);
while (true) { delay(10); }
}
// to help tune the receiver, SSTVClient can send
// continuous 1900 Hz beep
/*
sstv.idle();
while(true);
while (true) { delay(10); }
*/
}