[kp18058]: missing iterator problem

This commit is contained in:
NewoPL 2024-11-03 08:56:38 +01:00
parent 7f0b97c317
commit 6c06a826e9

View file

@ -91,8 +91,8 @@ void KP18058::program_led_driver() {
// Calculate parity bits for each byte // Calculate parity bits for each byte
uint8_t *settings_bytes = reinterpret_cast<uint8_t *>(&settings); uint8_t *settings_bytes = reinterpret_cast<uint8_t *>(&settings);
for (auto &byte : settings_bytes) { for (size_t i = 0; i < sizeof(KP18058_Settings); i++) {
byte |= get_parity_bit(byte); settings_bytes[i] |= get_parity_bit(settings_bytes[i]);
} }
// Send the I2C message // Send the I2C message