mirror of
https://github.com/meshtastic/firmware.git
synced 2026-02-01 19:21:11 -05:00
Segemented config works for me (TM)
Small GPS Fix that cropped up while testing included.
This commit is contained in:
@@ -60,7 +60,7 @@ MeshPacket *PositionModule::allocReply()
|
||||
|
||||
// configuration of POSITION packet
|
||||
// consider making this a function argument?
|
||||
uint32_t pos_flags = config.payloadVariant.position.position_flags;
|
||||
uint32_t pos_flags = config.position.position_flags;
|
||||
|
||||
// Populate a Position struct with ONLY the requested fields
|
||||
Position p = Position_init_default; // Start with an empty structure
|
||||
@@ -127,8 +127,8 @@ int32_t PositionModule::runOnce()
|
||||
|
||||
// We limit our GPS broadcasts to a max rate
|
||||
uint32_t now = millis();
|
||||
if (lastGpsSend == 0 || now - lastGpsSend >= config.payloadVariant.position.position_broadcast_secs
|
||||
? config.payloadVariant.position.position_broadcast_secs
|
||||
if (lastGpsSend == 0 || now - lastGpsSend >= config.position.position_broadcast_secs
|
||||
? config.position.position_broadcast_secs
|
||||
: default_broadcast_interval_secs * 1000) {
|
||||
|
||||
// Only send packets if the channel is less than 40% utilized.
|
||||
@@ -151,7 +151,7 @@ int32_t PositionModule::runOnce()
|
||||
DEBUG_MSG("Channel utilization is >50 percent. Skipping this opportunity to send.\n");
|
||||
}
|
||||
|
||||
} else if (!config.payloadVariant.position.position_broadcast_smart_disabled) {
|
||||
} else if (!config.position.position_broadcast_smart_disabled) {
|
||||
|
||||
// Only send packets if the channel is less than 25% utilized.
|
||||
if (airTime->channelUtilizationPercent() < 25) {
|
||||
|
||||
Reference in New Issue
Block a user