-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support of Toshiba Remote Control B #2093
Conversation
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? |
@@ -493,6 +494,23 @@ String IRToshibaAC::toString(void) const { | |||
return result; | |||
} | |||
|
|||
void IRToshibaAC::setRemoteControl(const uint8_t remote_type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use model, as example see
IRremoteESP8266/src/ir_Voltas.cpp
Line 131 in 32d10a6
void IRVoltas::setModel(const voltas_ac_remote_model_t model) { |
@@ -490,9 +491,37 @@ String IRToshibaAC::toString(void) const { | |||
result += addBoolToString(getEcono(), kEconoStr); | |||
result += addBoolToString(getFilter(), kFilterStr); | |||
} | |||
switch (getRemoteControl()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is addModelString helpers
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. |
You should keep using this branch and PR |
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. |
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. |
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. |
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. #2089
getInternalStateLength
function to extract the last 4-bits instead using 8-bits.