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 GitHub
parent 86385a1c19
commit 3c34b539b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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];