[SX127x] Fixed software timeout logic

This commit is contained in:
jgromes 2022-09-18 15:42:06 +02:00
parent cb5fd16710
commit e1d4c2094b

View file

@ -220,7 +220,7 @@ int16_t SX127x::receive(uint8_t* data, size_t len) {
while(!_mod->digitalRead(_mod->getIrq())) {
_mod->yield();
if(_mod->getGpio() != RADIOLIB_NC) {
if(_mod->getGpio() == RADIOLIB_NC) {
// no GPIO pin provided, use software timeout
if(_mod->micros() - start > timeout) {
clearIRQFlags();