From a907026c7b2a213e62a631c092b32a273616ce6a Mon Sep 17 00:00:00 2001 From: jgromes Date: Tue, 13 Feb 2024 07:04:04 +0100 Subject: [PATCH] [SX127x] Fixed software timeout duration (#962) --- src/modules/SX127x/SX127x.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/SX127x/SX127x.cpp b/src/modules/SX127x/SX127x.cpp index cdf68ad3..bdf4bae5 100644 --- a/src/modules/SX127x/SX127x.cpp +++ b/src/modules/SX127x/SX127x.cpp @@ -198,7 +198,7 @@ int16_t SX127x::receive(uint8_t* data, size_t len) { uint32_t timeout = 0; if(this->mod->getGpio() == RADIOLIB_NC) { float symbolLength = (float) (uint32_t(1) << this->spreadingFactor) / (float) this->bandwidth; - timeout = 100*symbolLength; + timeout = (uint32_t)(symbolLength * 100.0 * 1000.0); } // wait for packet reception or timeout