Merge pull request #746 from Olocool17/master

[SX1272] Correct LoRa mode CRC register values
This commit is contained in:
Jan Gromeš 2023-05-11 22:27:35 +02:00 committed by GitHub
commit 1c573bf598
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -365,9 +365,9 @@ int16_t SX1272::setCRC(bool enable, bool mode) {
// set LoRa CRC // set LoRa CRC
SX127x::crcEnabled = enable; SX127x::crcEnabled = enable;
if(enable) { if(enable) {
return(this->mod->SPIsetRegValue(RADIOLIB_SX127X_REG_MODEM_CONFIG_2, RADIOLIB_SX1272_RX_CRC_MODE_ON, 2, 2)); return(this->mod->SPIsetRegValue(RADIOLIB_SX127X_REG_MODEM_CONFIG_1, RADIOLIB_SX1272_RX_CRC_MODE_ON, 1, 1));
} else { } else {
return(this->mod->SPIsetRegValue(RADIOLIB_SX127X_REG_MODEM_CONFIG_2, RADIOLIB_SX1272_RX_CRC_MODE_OFF, 2, 2)); return(this->mod->SPIsetRegValue(RADIOLIB_SX127X_REG_MODEM_CONFIG_1, RADIOLIB_SX1272_RX_CRC_MODE_OFF, 1, 1));
} }
} else { } else {
// set FSK CRC // set FSK CRC