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 <jandriea@outlook.com>
1 parent 394cbfc commit 7f5ac83

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

micropython/lora/lora-sx127x/lora/sx127x.py

Lines changed: 2 additions & 2 deletions
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
Lines changed: 1 addition & 1 deletion
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)
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