kopia lustrzana https://github.com/micropython/micropython-lib
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>pull/893/head
rodzic
394cbfc98a
commit
7f5ac83865
|
@ -416,13 +416,13 @@ class _SX127x(BaseModem):
|
|||
modem_config1 |= (self._coding_rate - 4) << _MODEM_CONFIG1_CODING_RATE_SHIFT
|
||||
update_mask |= _MODEM_CONFIG1_CODING_RATE_MASK << _MODEM_CONFIG1_CODING_RATE_SHIFT
|
||||
|
||||
self._reg_update(_REG_MODEM_CONFIG1, update_mask, modem_config1)
|
||||
|
||||
if "implicit_header" in lora_cfg:
|
||||
self._implicit_header = lora_cfg["implicit_header"]
|
||||
modem_config1 |= _flag(_MODEM_CONFIG1_IMPLICIT_HEADER_MODE_ON, self._implicit_header)
|
||||
update_mask |= _MODEM_CONFIG1_IMPLICIT_HEADER_MODE_ON
|
||||
|
||||
self._reg_update(_REG_MODEM_CONFIG1, update_mask, modem_config1)
|
||||
|
||||
# Update MODEM_CONFIG2, for any fields that changed
|
||||
modem_config2 = 0
|
||||
update_mask = 0
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
metadata(version="0.1.1")
|
||||
metadata(version="0.1.2")
|
||||
require("lora")
|
||||
package("lora")
|
||||
|
|
Ładowanie…
Reference in New Issue