Skip to content

Commit f72f3f1

Browse files
barnsligdpgeorge
authored andcommitted
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

Lines changed: 3 additions & 3 deletions
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
Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy