Fix swapped order of operations in finishReceive

pull/1592/head
jgromes 2025-09-08 20:48:54 +02:00
rodzic 9c0f1b8c7d
commit c70ab67044
6 zmienionych plików z 24 dodań i 22 usunięć

Wyświetl plik

@ -474,12 +474,12 @@ int16_t LR11x0::readData(uint8_t* data, size_t len) {
}
int16_t LR11x0::finishReceive() {
// clear interrupt flags
int16_t state = clearIrqState(RADIOLIB_LR11X0_IRQ_ALL);
// set mode to standby to disable RF switch
int16_t state = standby();
RADIOLIB_ASSERT(state);
// set mode to standby to disable RF switch
return(standby());
// clear interrupt flags
return(clearIrqState(RADIOLIB_LR11X0_IRQ_ALL));
}
int16_t LR11x0::startChannelScan() {

Wyświetl plik

@ -485,11 +485,12 @@ int16_t RF69::readData(uint8_t* data, size_t len) {
}
int16_t RF69::finishReceive() {
// set mode to standby to disable RF switch
int16_t state = standby();
// clear interrupt flags
clearIRQFlags();
// set mode to standby to disable RF switch
return(standby());
return(state);
}
int16_t RF69::setOOK(bool enable) {

Wyświetl plik

@ -511,8 +511,8 @@ int16_t SX126x::finishTransmit() {
}
int16_t SX126x::finishReceive() {
// clear interrupt flags
int16_t state = clearIrqStatus();
// set mode to standby to disable RF switch
int16_t state = standby();
RADIOLIB_ASSERT(state);
// try to fix timeout error in implicit header mode
@ -520,8 +520,8 @@ int16_t SX126x::finishReceive() {
state = fixImplicitTimeout();
RADIOLIB_ASSERT(state);
// set mode to standby to disable RF switch
return(standby());
// clear interrupt flags
return(clearIrqStatus());
}
int16_t SX126x::startReceive() {

Wyświetl plik

@ -571,12 +571,12 @@ int16_t SX127x::readData(uint8_t* data, size_t len) {
}
int16_t SX127x::finishReceive() {
// clear interrupt flags
int16_t state = clearIrqFlags(RADIOLIB_SX127X_FLAGS_ALL);
// set mode to standby to disable RF switch
int16_t state = standby();
RADIOLIB_ASSERT(state);
// set mode to standby to disable RF switch
return(standby());
// clear interrupt flags
return(clearIrqFlags(RADIOLIB_SX127X_FLAGS_ALL));
}
int16_t SX127x::startChannelScan() {

Wyświetl plik

@ -569,12 +569,12 @@ int16_t SX128x::readData(uint8_t* data, size_t len) {
}
int16_t SX128x::finishReceive() {
// clear interrupt flags
int16_t state = clearIrqStatus();
// set mode to standby to disable RF switch
int16_t state = standby();
RADIOLIB_ASSERT(state);
// set mode to standby to disable RF switch
return(standby());
// clear interrupt flags
return(clearIrqStatus());
}
uint32_t SX128x::getIrqFlags() {

Wyświetl plik

@ -351,11 +351,12 @@ int16_t Si443x::readData(uint8_t* data, size_t len) {
}
int16_t Si443x::finishReceive() {
// set mode to standby to disable RF switch
int16_t state = standby();
// clear interrupt flags
clearIrqStatus();
// set mode to standby to disable RF switch
return(standby());
return(state);
}
int16_t Si443x::setBitRate(float br) {