sx127x: correct header type implicit/explcit as they were reversed

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2023-01-08 14:30:55 +01:00
committed by Ron Evans
parent 6b817faed3
commit 98943393a5
+1 -1
View File
@@ -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)