mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
[kp18058]: missing iterator problem
This commit is contained in:
parent
7f0b97c317
commit
6c06a826e9
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue