From d4e543a98f80a1e305e082845a7b663b576cb31c Mon Sep 17 00:00:00 2001 From: Alec Perkins Date: Wed, 7 Jan 2026 12:46:33 -0500 Subject: [PATCH] Tolerate slight variation in frequency readout --- modjam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modjam.py b/modjam.py index 03b4873..1d3b8ff 100644 --- a/modjam.py +++ b/modjam.py @@ -213,7 +213,7 @@ def configureRadio (conf: RadioConfig): if coding_rate != node.localConfig.lora.coding_rate: changed = True node.localConfig.lora.coding_rate = coding_rate - if override_frequency != node.localConfig.lora.override_frequency: + 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 node.localConfig.lora.override_frequency = override_frequency if tx_power != node.localConfig.lora.tx_power: