Skip to content
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

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix linting issues
jackysze committed May 12, 2024
commit 5a0844cca3d8b0788e8a6eca48dfa3d9b65f0ddf
7 changes: 3 additions & 4 deletions src/ir_Toshiba.cpp
Original file line number Diff line number Diff line change
@@ -105,8 +105,8 @@ uint16_t IRToshibaAC::getInternalStateLength(const uint8_t state[],
const uint16_t size) {
if (size < kToshibaAcLengthByte) return 0;
// Fix: Extract the last 4 bits instead
return std::min((uint16_t)((state[kToshibaAcLengthByte] & 0xF) + kToshibaAcMinLength),
kToshibaACStateLengthLong);
return std::min((uint16_t)((state[kToshibaAcLengthByte] & 0xF)
+ kToshibaAcMinLength), kToshibaACStateLengthLong);
}

/// Get the length of the current internal state per the protocol structure.
@@ -495,8 +495,7 @@ String IRToshibaAC::toString(void) const {
}

void IRToshibaAC::setRemoteControl(const uint8_t remote_type) {
Copy link
Collaborator

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

void IRVoltas::setModel(const voltas_ac_remote_model_t model) {

switch (remote_type)
{
switch (remote_type) {
case kToshibaAcRemoteA:
case kToshibaAcRemoteB:
_.Remote = remote_type;