From 86ca0290235fdbca48950b35780cbeecb7b3e6a2 Mon Sep 17 00:00:00 2001 From: mmrein <55082189+mmrein@users.noreply.github.com> Date: Mon, 16 Sep 2019 19:25:35 +0200 Subject: [PATCH] Update SX126x.cpp --- src/modules/SX126x.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/SX126x.cpp b/src/modules/SX126x.cpp index e76b05e2..99996ea8 100644 --- a/src/modules/SX126x.cpp +++ b/src/modules/SX126x.cpp @@ -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);