Segemented config works for me (TM)

Small GPS Fix that cropped up while testing included.
This commit is contained in:
Thomas Göttgens
2022-05-21 22:38:33 +02:00
parent 33938f73a6
commit 53e9f4df46
27 changed files with 146 additions and 119 deletions

View File

@@ -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) {