[CC1101] Fix packet mode not resetting directModeEnabled bool

This commit is contained in:
Jack Hance 2024-06-12 10:14:06 -05:00
parent 1ea1a703a5
commit f9dd918d77

View file

@ -1083,6 +1083,9 @@ int16_t CC1101::setPacketMode(uint8_t mode, uint16_t len) {
state = SPIsetRegValue(RADIOLIB_CC1101_REG_PKTLEN, len);
RADIOLIB_ASSERT(state);
// no longer in a direct mode
this->directModeEnabled = false;
// update the cached values
this->packetLength = len;
this->packetLengthConfig = mode;