We only need to number unknown and unused to make the first real
entry start from 1 and the next entries will have the next value.
Also reordered to try and keep the order the same as the original
IRremote lib and added a comment that it's somewhat important to
save that order to keep consistency with projects saving the type value
for later usage.
Note that there is still a small mismatch because this lib already has the
additional protocol COOLIX and the original IRremove has the additional
protocols as well.
Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
This method is useful in projects where the type and data is transmitted in
and then need to use the correct method according to the type.
Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
Telegrams consist of 3 bytes. Each byte is sent twice for redundancy - second time inverted.
Tested with Coolix (Manufactured for Jula Postorder AB) A/C / heatpump which apparently is identical to Midea A/C and probably lots of other from the same OEM.
With this part of code commented I couldn't decode Panasonic codes. After uncommenting it works fine. (It is uncommented in 2.1.0 version of Arduino-IRremote library)
Original IRremote lib had all commands prefixed by initial space. This
is
required for most of the other decoding logic to work (I had issues with
RC5)