[SX128x] Simplify sync word configuration

pull/1448/head
jgromes 2025-03-03 08:36:03 +01:00
rodzic d142928e9f
commit 08e0c0e613
1 zmienionych plików z 1 dodań i 6 usunięć

Wyświetl plik

@ -996,13 +996,8 @@ int16_t SX128x::setSyncWord(const uint8_t* syncWord, uint8_t len) {
this->syncWordLen = len;
}
uint8_t syncWordBuff[] = { 0x00, 0x00, 0x00, 0x00, 0x00 };
for(uint8_t i = 0; i < len; i++) {
syncWordBuff[i] = syncWord[i];
}
// update sync word
int16_t state = SX128x::writeRegister(RADIOLIB_SX128X_REG_SYNC_WORD_1_BYTE_4, syncWordBuff, 5);
int16_t state = SX128x::writeRegister(RADIOLIB_SX128X_REG_SYNC_WORD_1_BYTE_4, syncWord, len);
RADIOLIB_ASSERT(state);
// update packet parameters