ToniA / arduino-heatpumpir

An Arduino library to control split-unit heatpumps over Infrared
GNU General Public License v2.0
389 stars 141 forks source link

Gree Generic/YAA remotes checksum #69

Closed abdulmannan closed 5 years ago

abdulmannan commented 5 years ago

Gree Generic/Yaa checksum is not calculated correctly. Here is the corrected checksum code.

GreeTemplate[7] = ((( (GreeTemplate[0] & 0x0F) + (GreeTemplate[1] & 0x0F) + (GreeTemplate[2] & 0x0F) + (GreeTemplate[3] & 0x0F) + ((GreeTemplate[5] & 0xF0) >> 4) + ((GreeTemplate[6] & 0xF0) >> 4) + ((GreeTemplate[7] & 0xF0) >> 4) + 0x0A) & 0x0F) << 4) | (GreeTemplate[7] & 0x0F);

abdulmannan commented 5 years ago

Got help from: https://github.com/markszabo/IRremoteESP8266/blob/master/src/ir_Gree.cpp

abdulmannan commented 5 years ago

Corrected code merged.