Skip to content

Commit f72f3f1

Browse files
barnsligdpgeorge
authored andcommittedApr 10, 2025
lora-sx126x: Fix invert_iq_rx / invert_iq_tx behaviour.
This commit fixes a typo and changes a tuple that needs to be mutable to a list (because other parts of the code change elements of this list). Signed-off-by: Damien George <damien@micropython.org>
1 parent 221a877 commit f72f3f1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎micropython/lora/lora-sx126x/lora/sx126x.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,11 @@ def configure(self, lora_cfg):
363363
if "preamble_len" in lora_cfg:
364364
self._preamble_len = lora_cfg["preamble_len"]
365365

366-
self._invert_iq = (
366+
self._invert_iq = [
367367
lora_cfg.get("invert_iq_rx", self._invert_iq[0]),
368368
lora_cfg.get("invert_iq_tx", self._invert_iq[1]),
369369
self._invert_iq[2],
370-
)
370+
]
371371

372372
if "freq_khz" in lora_cfg:
373373
self._rf_freq_hz = int(lora_cfg["freq_khz"] * 1000)
@@ -449,7 +449,7 @@ def configure(self, lora_cfg):
449449
def _invert_workaround(self, enable):
450450
# Apply workaround for DS 15.4 Optimizing the Inverted IQ Operation
451451
if self._invert_iq[2] != enable:
452-
val = self._read_read(_REG_IQ_POLARITY_SETUP)
452+
val = self._reg_read(_REG_IQ_POLARITY_SETUP)
453453
val = (val & ~4) | _flag(4, enable)
454454
self._reg_write(_REG_IQ_POLARITY_SETUP, val)
455455
self._invert_iq[2] = enable
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
metadata(version="0.1.3")
1+
metadata(version="0.1.4")
22
require("lora")
33
package("lora")

0 commit comments

Comments
 (0)