crankyoldgit / IRremoteESP8266

Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/
GNU Lesser General Public License v2.1
2.84k stars 810 forks source link

Add support of Toshiba Remote Control B #2093

Closed jackysze closed 1 month ago

jackysze commented 1 month ago

Add support to Toshiba Remote Control B

The third byte in the raw state array originally represents payload length only. It was found that the first 4 bits is being used to identify whether current remote control is A or B. https://github.com/crankyoldgit/IRremoteESP8266/issues/2089

  1. Modify the struct to accommodate both payload length and remote control type.
  2. Add constants and functions to set/get current remote control type.
  3. Fix the getInternalStateLength function to extract the last 4-bits instead using 8-bits.
NiKiZe commented 1 month ago

Nice!

Consider adding remote model to text representation output, check other AC protocols where there is different models of remote. And also tests for this if possible?

NiKiZe commented 1 month ago

Nice!

Consider adding remote model to text representation output, check other AC protocols where there is different models of remote. And also tests for this if possible?

As mentioned here, please use the existing concept of remote model, this goes for all of the namings, take inspiration of the example linked inline, as well as other protocols using remote models, try to reuse as much as possible of the existing framework, strings etc.

NiKiZe commented 1 month ago

You should keep using this branch and PR

jackysze commented 1 month ago

I'm sorry, but I would prefer to close my pull request as I don't have much time to investigate the entire codebase and adhere to all coding standards. However, I believe my findings could assist the main contributors in implementing this enhancement to meet the team's standards. Thank you.

NiKiZe commented 1 month ago

Thanks for posting a comment.

feel free to just leave th PR open and we can finalize it, it's a great work that just needs some final adjustments.

jackysze commented 1 month ago

I've reverted the commit on my branch to cleanup the lousy changes with a force push and seems the PR can't be reopened.