mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-17 18:42:10 +00:00
Better not to compare float directly
This commit is contained in:
parent
6b0f18e1e4
commit
a3b93a4dcf
@ -199,7 +199,7 @@ ErrorCode Router::send(MeshPacket *p)
|
|||||||
} // should have already been handled by sendLocal
|
} // should have already been handled by sendLocal
|
||||||
|
|
||||||
// Abort sending if we are violating the duty cycle
|
// Abort sending if we are violating the duty cycle
|
||||||
if (!config.lora.override_duty_cycle && myRegion->dutyCycle != 100) {
|
if (!config.lora.override_duty_cycle && myRegion->dutyCycle < 100) {
|
||||||
float hourlyTxPercent = airTime->utilizationTXPercent();
|
float hourlyTxPercent = airTime->utilizationTXPercent();
|
||||||
if (hourlyTxPercent > myRegion->dutyCycle) {
|
if (hourlyTxPercent > myRegion->dutyCycle) {
|
||||||
uint8_t silentMinutes = airTime->getSilentMinutes(hourlyTxPercent, myRegion->dutyCycle);
|
uint8_t silentMinutes = airTime->getSilentMinutes(hourlyTxPercent, myRegion->dutyCycle);
|
||||||
|
Loading…
Reference in New Issue
Block a user