From bf3ddfb44081b3d93798d8e94459261ab5d2cfaa Mon Sep 17 00:00:00 2001 From: Alec Perkins Date: Wed, 7 Jan 2026 20:55:03 -0500 Subject: [PATCH] Force OkToMQTT off --- modjam.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modjam.py b/modjam.py index a20eb94..d80e89b 100644 --- a/modjam.py +++ b/modjam.py @@ -192,6 +192,7 @@ def configureRadio (conf: RadioConfig): node = interface.getNode('^all') changed = False + config_ok_to_mqtt = False use_preset = False bandwidth = conf['bw'] spread_factor = conf['sf'] @@ -201,6 +202,10 @@ def configureRadio (conf: RadioConfig): tx_enabled = True hop_limit = 0 + if config_ok_to_mqtt != node.localConfig.lora.config_ok_to_mqtt: + changed = True + print('changed: lora.config_ok_to_mqtt', node.localConfig.lora.config_ok_to_mqtt, 'to', config_ok_to_mqtt) + node.localConfig.lora.config_ok_to_mqtt = config_ok_to_mqtt if use_preset != node.localConfig.lora.use_preset: changed = True print('changed: lora.use_preset', node.localConfig.lora.use_preset, 'to', use_preset) @@ -235,9 +240,11 @@ def configureRadio (conf: RadioConfig): node.localConfig.lora.hop_limit = hop_limit if changed: + print('applying changes') node.beginSettingsTransaction() node.writeConfig('lora') node.commitSettingsTransaction() + print('changes applied, waiting for reboot') return changed