Fix update neighbor_info before checking update_interval in handleSetModuleConfig
This commit is contained in:
@@ -1013,11 +1013,11 @@ bool AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c)
|
|||||||
case meshtastic_ModuleConfig_neighbor_info_tag:
|
case meshtastic_ModuleConfig_neighbor_info_tag:
|
||||||
LOG_INFO("Set module config: Neighbor Info");
|
LOG_INFO("Set module config: Neighbor Info");
|
||||||
moduleConfig.has_neighbor_info = true;
|
moduleConfig.has_neighbor_info = true;
|
||||||
|
moduleConfig.neighbor_info = c.payload_variant.neighbor_info;
|
||||||
if (moduleConfig.neighbor_info.update_interval < min_neighbor_info_broadcast_secs) {
|
if (moduleConfig.neighbor_info.update_interval < min_neighbor_info_broadcast_secs) {
|
||||||
LOG_DEBUG("Tried to set update_interval too low, setting to %d", default_neighbor_info_broadcast_secs);
|
LOG_DEBUG("Tried to set update_interval too low, setting to %d", default_neighbor_info_broadcast_secs);
|
||||||
moduleConfig.neighbor_info.update_interval = default_neighbor_info_broadcast_secs;
|
moduleConfig.neighbor_info.update_interval = default_neighbor_info_broadcast_secs;
|
||||||
}
|
}
|
||||||
moduleConfig.neighbor_info = c.payload_variant.neighbor_info;
|
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_detection_sensor_tag:
|
case meshtastic_ModuleConfig_detection_sensor_tag:
|
||||||
LOG_INFO("Set module config: Detection Sensor");
|
LOG_INFO("Set module config: Detection Sensor");
|
||||||
|
|||||||
Reference in New Issue
Block a user