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

@ -60,7 +60,7 @@ void setup()
#else
int state = radio.begin(LoRa_frequency);
#endif
if (state == ERR_NONE) {
if (state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {
Serial.print(F("failed, code "));
@ -76,14 +76,14 @@ void setup()
state = radio.startReceive();
#ifdef HAS_DISPLAY
if (u8g2) {
if (state != ERR_NONE) {
if (state != RADIOLIB_ERR_NONE) {
u8g2->clearBuffer();
u8g2->drawStr(0, 12, "Initializing: FAIL!");
u8g2->sendBuffer();
}
}
#endif
if (state == ERR_NONE) {
if (state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {
Serial.print(F("failed, code "));
@ -125,7 +125,7 @@ void loop()
int state = radio.readData(byteArr, 8);
*/
if (state == ERR_NONE) {
if (state == RADIOLIB_ERR_NONE) {
// packet was successfully received
Serial.println(F("[SX1276] Received packet!"));
@ -160,7 +160,7 @@ void loop()
u8g2->sendBuffer();
}
#endif
} else if (state == ERR_CRC_MISMATCH) {
} else if (state == RADIOLIB_ERR_CRC_MISMATCH) {
// packet was received, but is malformed
Serial.println(F("[SX1276] CRC error!"));