mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-02 10:50:40 +00:00
Same as NodeDB position_broadcast_secs bug but different (#1645)
* intervalMs
This commit is contained in:
parent
e7831f13c5
commit
9a03b2e49d
@ -129,9 +129,8 @@ int32_t PositionModule::runOnce()
|
||||
|
||||
// We limit our GPS broadcasts to a max rate
|
||||
uint32_t now = millis();
|
||||
if (lastGpsSend == 0 || now - lastGpsSend >= config.position.position_broadcast_secs
|
||||
? config.position.position_broadcast_secs
|
||||
: default_broadcast_interval_secs * 1000) {
|
||||
uint32_t intervalMs = config.position.position_broadcast_secs > 0 ? config.position.position_broadcast_secs * 1000 : default_broadcast_interval_secs * 1000;
|
||||
if (lastGpsSend == 0 || (now - lastGpsSend) >= intervalMs) {
|
||||
|
||||
// Only send packets if the channel is less than 40% utilized.
|
||||
if (airTime->channelUtilizationPercent() < 40) {
|
||||
|
Loading…
Reference in New Issue
Block a user