mirror of https://github.com/ARMmbed/mbed-os.git
Fix calculation of the aggregated time-off.
Perform only an assignment. https://github.com/Lora-net/LoRaMac-node/issues/282pull/6411/head
parent
c1ea418ac4
commit
256a3a5842
|
|
@ -1273,10 +1273,10 @@ void LoRaMac::calculate_backOff(uint8_t channel)
|
|||
// Update regional back-off
|
||||
lora_phy->calculate_backoff(&backoff_params);
|
||||
|
||||
// Update aggregated time-off
|
||||
_params.timers.aggregated_timeoff = _params.timers.aggregated_timeoff
|
||||
+ (_params.timers.tx_toa * _params.sys_params.aggregated_duty_cycle
|
||||
- _params.timers.tx_toa);
|
||||
// Update aggregated time-off. This must be an assignment and no incremental
|
||||
// update as we do only calculate the time-off based on the last transmission
|
||||
_params.timers.aggregated_timeoff = (_params.timers.tx_toa * _params.sys_params.aggregated_duty_cycle
|
||||
- _params.timers.tx_toa);
|
||||
}
|
||||
|
||||
void LoRaMac::reset_mac_parameters(void)
|
||||
|
|
|
|||
Loading…
Reference in New Issue