[LoRaWAN] Fix JoinRequest dwelltime calculation
This commit is contained in:
parent
ce8e6fdfb0
commit
33480235d6
1 changed files with 2 additions and 1 deletions
|
@ -510,7 +510,8 @@ int16_t LoRaWANNode::activateOTAA(uint8_t joinDr, LoRaWANJoinEvent_t *joinEvent)
|
|||
RADIOLIB_ASSERT(state);
|
||||
|
||||
if(this->dwellTimeEnabledUp) {
|
||||
RadioLibTime_t toa = this->phyLayer->getTimeOnAir(RADIOLIB_LORAWAN_JOIN_REQUEST_LEN);
|
||||
// calculate JoinRequest time-on-air in milliseconds
|
||||
RadioLibTime_t toa = this->phyLayer->getTimeOnAir(RADIOLIB_LORAWAN_JOIN_REQUEST_LEN) / 1000;
|
||||
if(toa > this->dwellTimeUp) {
|
||||
return(RADIOLIB_ERR_DWELL_TIME_EXCEEDED);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue