Skip to content

Commit 7f5ac83

Browse files
jandrieadpgeorge
authored andcommitted
lora-sx127x: Fix configuring the implicit header option in the _SX127x.
The `_reg_update` method must be called after updating the implicit header option's bit. Signed-off-by: Jatty Andriean <[email protected]>
1 parent 394cbfc commit 7f5ac83

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: micropython/lora/lora-sx127x/lora/sx127x.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -416,13 +416,13 @@ def configure(self, lora_cfg):
416416
modem_config1 |= (self._coding_rate - 4) << _MODEM_CONFIG1_CODING_RATE_SHIFT
417417
update_mask |= _MODEM_CONFIG1_CODING_RATE_MASK << _MODEM_CONFIG1_CODING_RATE_SHIFT
418418

419-
self._reg_update(_REG_MODEM_CONFIG1, update_mask, modem_config1)
420-
421419
if "implicit_header" in lora_cfg:
422420
self._implicit_header = lora_cfg["implicit_header"]
423421
modem_config1 |= _flag(_MODEM_CONFIG1_IMPLICIT_HEADER_MODE_ON, self._implicit_header)
424422
update_mask |= _MODEM_CONFIG1_IMPLICIT_HEADER_MODE_ON
425423

424+
self._reg_update(_REG_MODEM_CONFIG1, update_mask, modem_config1)
425+
426426
# Update MODEM_CONFIG2, for any fields that changed
427427
modem_config2 = 0
428428
update_mask = 0

Diff for: micropython/lora/lora-sx127x/manifest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
metadata(version="0.1.1")
1+
metadata(version="0.1.2")
22
require("lora")
33
package("lora")

0 commit comments

Comments
 (0)