Update config_init.py

work for disabling modules from config.ini
This commit is contained in:
Blergo 2024-07-03 13:16:25 +01:00 committed by GitHub
parent c73d26d764
commit 418b52111a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,7 +110,11 @@ def initialize_config(config_file:str = None) -> dict[str, Any]:
if bbs_nodes == ['']:
bbs_nodes = []
return {'config':config, 'interface_type': interface_type, 'hostname': hostname, 'port': port, 'bbs_nodes': bbs_nodes, 'mqtt_topic': 'meshtastic.receive'}
disabled = config.get('modules', 'disabled', fallback='').split(',')
if disabled == ['']:
disabled = []
return {'config':config, 'interface_type': interface_type, 'hostname': hostname, 'port': port, 'bbs_nodes': bbs_nodes, 'disabled': disabled, 'mqtt_topic': 'meshtastic.receive'}
def get_interface(system_config:dict[str, Any]) -> meshtastic.stream_interface.StreamInterface: