[SX126x] Explicitly enabled CRC (#706)

This commit is contained in:
jgromes 2023-03-23 19:07:04 +01:00
parent c3de8b9099
commit 9dae818033

View file

@ -73,6 +73,12 @@ int16_t SX126x::begin(uint8_t cr, uint8_t syncWord, uint16_t preambleLength, flo
state = setPreambleLength(preambleLength);
RADIOLIB_ASSERT(state);
if (useRegulatorLDO) {
state = setRegulatorLDO();
} else {
state = setRegulatorDCDC();
}
// set publicly accessible settings that are not a part of begin method
state = setCurrentLimit(60.0);
RADIOLIB_ASSERT(state);
@ -80,11 +86,8 @@ int16_t SX126x::begin(uint8_t cr, uint8_t syncWord, uint16_t preambleLength, flo
state = setDio2AsRfSwitch(true);
RADIOLIB_ASSERT(state);
if (useRegulatorLDO) {
state = setRegulatorLDO();
} else {
state = setRegulatorDCDC();
}
state = setCRC(2);
RADIOLIB_ASSERT(state);
return(state);
}