Upgrade RadioLib to 5.50

This commit is contained in:
lewishe 2022-12-09 16:12:04 +08:00
commit 6301fa4734
208 changed files with 15925 additions and 10099 deletions

View file

@ -91,7 +91,7 @@ void setup() {
// initialize SX1278 with default settings
Serial.print(F("[SX1278] Initializing ... "));
int state = radio.beginFSK();
if (state == ERR_NONE) {
if (state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {
Serial.print(F("failed, code "));
@ -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);
}
// 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,8 +125,9 @@ 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);
if(state == ERR_NONE) {
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 "));

View file

@ -90,7 +90,7 @@ void setup() {
// initialize SX1278 with default settings
Serial.print(F("[SX1278] Initializing ... "));
int state = radio.beginFSK();
if (state == ERR_NONE) {
if (state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {
Serial.print(F("failed, code "));
@ -105,7 +105,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);
}
// 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,8 +123,9 @@ 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);
if(state == ERR_NONE) {
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 "));