Update SX126x.cpp

This commit is contained in:
mmrein 2019-09-16 19:25:35 +02:00 committed by GitHub
parent 1046db24e4
commit 86ca029023
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -733,7 +733,9 @@ int16_t SX126x::setSyncBits(uint8_t *syncWord, uint8_t bitsLen) {
}
uint8_t bytesLen = bitsLen / 8;
if ((bitsLen % 8) != 0) bytesLen++;
if ((bitsLen % 8) != 0) {
bytesLen++;
}
// write sync word
int16_t state = writeRegister(SX126X_REG_SYNC_WORD_0, syncWord, bytesLen);