Skip to content

Commit

Permalink
[SX126x] Make Tx timeout at least 5 ms (#1338)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Dec 8, 2024
1 parent 116d60d commit 577a076
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/SX126x/SX126x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ int16_t SX126x::transmit(const uint8_t* data, size_t len, uint8_t addr) {
return(RADIOLIB_ERR_PACKET_TOO_LONG);
}

// calculate timeout in ms (500% of expected time-on-air)
RadioLibTime_t timeout = (getTimeOnAir(len) * 5) / 1000;
// calculate timeout in ms (5ms + 500 % of expected time-on-air)
RadioLibTime_t timeout = 5 + (getTimeOnAir(len) * 5) / 1000;
RADIOLIB_DEBUG_BASIC_PRINTLN("Timeout in %lu ms", timeout);

// start transmission
Expand Down

0 comments on commit 577a076

Please sign in to comment.