Whirlpool ac (#1467)

* Checksum calc change

* first checksum change for MODEL_DG11J1_3A
This commit is contained in:
mmanza 2021-01-12 09:51:38 -03:00 committed by Jesse Hills
parent c8058e9636
commit 9f36b25d4e
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -105,7 +105,7 @@ void WhirlpoolClimate::transmit_state() {
}
// Checksum
for (uint8_t i = 2; i < 12; i++)
for (uint8_t i = 2; i < 13; i++)
remote_state[13] ^= remote_state[i];
for (uint8_t i = 14; i < 20; i++)
remote_state[20] ^= remote_state[i];
@ -184,7 +184,7 @@ bool WhirlpoolClimate::on_receive(remote_base::RemoteReceiveData data) {
uint8_t checksum13 = 0;
uint8_t checksum20 = 0;
// Calculate checksum and compare with signal value.
for (uint8_t i = 2; i < 12; i++)
for (uint8_t i = 2; i < 13; i++)
checksum13 ^= remote_state[i];
for (uint8_t i = 14; i < 20; i++)
checksum20 ^= remote_state[i];