Display changed config values
This commit is contained in:
parent
d4e543a98f
commit
78ec96078b
1 changed files with 8 additions and 0 deletions
|
|
@ -203,27 +203,35 @@ def configureRadio (conf: RadioConfig):
|
|||
|
||||
if use_preset != node.localConfig.lora.use_preset:
|
||||
changed = True
|
||||
print('changed: lora.use_preset', node.localConfig.lora.use_preset, 'to', use_preset)
|
||||
node.localConfig.lora.use_preset = use_preset
|
||||
if bandwidth != node.localConfig.lora.bandwidth:
|
||||
changed = True
|
||||
print('changed: lora.bandwidth', node.localConfig.lora.bandwidth, 'to', bandwidth)
|
||||
node.localConfig.lora.bandwidth = bandwidth
|
||||
if spread_factor != node.localConfig.lora.spread_factor:
|
||||
changed = True
|
||||
print('changed: lora.spread_factor', node.localConfig.lora.spread_factor, 'to', spread_factor)
|
||||
node.localConfig.lora.spread_factor = spread_factor
|
||||
if coding_rate != node.localConfig.lora.coding_rate:
|
||||
changed = True
|
||||
print('changed: lora.coding_rate', node.localConfig.lora.coding_rate, 'to', coding_rate)
|
||||
node.localConfig.lora.coding_rate = coding_rate
|
||||
if abs(override_frequency - node.localConfig.lora.override_frequency) > 1e-4: # Tolerate slight variation due to floating point precision and the way the radio tunes to the actual frequency
|
||||
changed = True
|
||||
print('changed: lora.override_frequency', node.localConfig.lora.override_frequency, 'to', override_frequency)
|
||||
node.localConfig.lora.override_frequency = override_frequency
|
||||
if tx_power != node.localConfig.lora.tx_power:
|
||||
changed = True
|
||||
print('changed: lora.tx_power', node.localConfig.lora.tx_power, 'to', tx_power)
|
||||
node.localConfig.lora.tx_power = tx_power
|
||||
if tx_enabled != node.localConfig.lora.tx_enabled:
|
||||
changed = True
|
||||
print('changed: lora.tx_enabled', node.localConfig.lora.tx_enabled, 'to', tx_enabled)
|
||||
node.localConfig.lora.tx_enabled = tx_enabled
|
||||
if hop_limit != node.localConfig.lora.hop_limit:
|
||||
changed = True
|
||||
print('changed: lora.hop_limit', node.localConfig.lora.hop_limit, 'to', hop_limit)
|
||||
node.localConfig.lora.hop_limit = hop_limit
|
||||
|
||||
if changed:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue