Add error handling for SPI command failures in LR11x0, RF95, and SX128x interfaces (#9447)

This commit is contained in:
Ben Meadors
2026-01-27 13:06:50 -06:00
committed by GitHub
parent d54ae5dad8
commit b6a1020fc5
3 changed files with 17 additions and 1 deletions

View File

@@ -177,6 +177,9 @@ bool RF95Interface::init()
int res = lora->begin(getFreq(), bw, sf, cr, syncWord, power, preambleLength);
LOG_INFO("RF95 init result %d", res);
if (res == RADIOLIB_ERR_CHIP_NOT_FOUND || res == RADIOLIB_ERR_SPI_CMD_FAILED)
return false;
LOG_INFO("Frequency set to %f", getFreq());
LOG_INFO("Bandwidth set to %f", bw);
LOG_INFO("Power output set to %d", power);