mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-06 16:03:41 +00:00
sx127x: correct header type implicit/explcit as they were reversed
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
+1
-1
@@ -263,7 +263,7 @@ func (d *Device) SetLoraCodingRate(cr uint8) {
|
||||
// SetImplicitHeaderModeOn Enables implicit header mode ***
|
||||
func (d *Device) SetLoraHeaderMode(headerType uint8) {
|
||||
d.loraConf.HeaderType = headerType
|
||||
if headerType == lora.HeaderExplicit {
|
||||
if headerType == lora.HeaderImplicit {
|
||||
d.WriteRegister(SX127X_REG_MODEM_CONFIG_1, d.ReadRegister(SX127X_REG_MODEM_CONFIG_1)|0x01)
|
||||
} else {
|
||||
d.WriteRegister(SX127X_REG_MODEM_CONFIG_1, d.ReadRegister(SX127X_REG_MODEM_CONFIG_1)&0xfe)
|
||||
|
||||
Reference in New Issue
Block a user