[LoRaWAN] Revert change in dwell time arguments
This commit is contained in:
parent
5952106e93
commit
283bfb43fe
3 changed files with 13 additions and 5 deletions
|
@ -69,7 +69,7 @@ void setup() {
|
||||||
node.setDutyCycle(true, 1250);
|
node.setDutyCycle(true, 1250);
|
||||||
|
|
||||||
// Update dwell time limits - 400ms is the limit for the US
|
// Update dwell time limits - 400ms is the limit for the US
|
||||||
node.setDwellTime(400);
|
node.setDwellTime(true, 400);
|
||||||
|
|
||||||
Serial.println(F("Ready!\n"));
|
Serial.println(F("Ready!\n"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2696,8 +2696,15 @@ void LoRaWANNode::setDutyCycle(bool enable, RadioLibTime_t msPerHour) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoRaWANNode::setDwellTime(RadioLibTime_t msPerUplink) {
|
void LoRaWANNode::setDwellTime(bool enable, RadioLibTime_t msPerUplink) {
|
||||||
this->dwellTimeUp = msPerUplink;
|
if(!enable) {
|
||||||
|
this->dwellTimeUp = 0;
|
||||||
|
|
||||||
|
} else if(msPerUplink > 0) {
|
||||||
|
this->dwellTimeUp = msPerUplink;
|
||||||
|
} else { //msPerUplink == 0
|
||||||
|
this->dwellTimeUp = this->band->dwellTimeUp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// A user may enable CSMA to provide frames an additional layer of protection from interference.
|
// A user may enable CSMA to provide frames an additional layer of protection from interference.
|
||||||
|
|
|
@ -744,10 +744,11 @@ class LoRaWANNode {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Set or disable uplink dwell time limitation; enabled by default if mandatory.
|
\brief Set or disable uplink dwell time limitation; enabled by default if mandatory.
|
||||||
|
\param enable Whether to adhere to dwellTime limits or not (default true).
|
||||||
\param msPerUplink The maximum allowed Time-on-Air per uplink in milliseconds
|
\param msPerUplink The maximum allowed Time-on-Air per uplink in milliseconds
|
||||||
(0 = no dwell time limitation, make sure you follow regulations/law!).
|
(default 0 = band default value); make sure you follow regulations/law!
|
||||||
*/
|
*/
|
||||||
void setDwellTime(RadioLibTime_t msPerUplink);
|
void setDwellTime(bool enable, RadioLibTime_t msPerUplink = 0);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Configures CSMA for LoRaWAN as per TR013, LoRa Alliance.
|
\brief Configures CSMA for LoRaWAN as per TR013, LoRa Alliance.
|
||||||
|
|
Loading…
Add table
Reference in a new issue