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 Mitsubishi AC "fan only" mode #1527

Merged
merged 4 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
5 changes: 4 additions & 1 deletion src/ir_Mitsubishi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ void IRMitsubishiAC::setMode(const uint8_t mode) {
case kMitsubishiAcCool: _.raw[8] = 0b00110110; break;
case kMitsubishiAcDry: _.raw[8] = 0b00110010; break;
case kMitsubishiAcHeat: _.raw[8] = 0b00110000; break;
case kMitsubishiAcFan: _.raw[8] = 0b00110111; break;
default:
_.raw[8] = 0b00110000;
_.Mode = kMitsubishiAcAuto;
Expand Down Expand Up @@ -612,6 +613,7 @@ uint8_t IRMitsubishiAC::convertMode(const stdAc::opmode_t mode) {
case stdAc::opmode_t::kCool: return kMitsubishiAcCool;
case stdAc::opmode_t::kHeat: return kMitsubishiAcHeat;
case stdAc::opmode_t::kDry: return kMitsubishiAcDry;
case stdAc::opmode_t::kFan: return kMitsubishiAcFan;
default: return kMitsubishiAcAuto;
}
}
Expand Down Expand Up @@ -679,6 +681,7 @@ stdAc::opmode_t IRMitsubishiAC::toCommonMode(const uint8_t mode) {
case kMitsubishiAcCool: return stdAc::opmode_t::kCool;
case kMitsubishiAcHeat: return stdAc::opmode_t::kHeat;
case kMitsubishiAcDry: return stdAc::opmode_t::kDry;
case kMitsubishiAcFan: return stdAc::opmode_t::kFan;
default: return stdAc::opmode_t::kAuto;
}
}
Expand Down Expand Up @@ -780,7 +783,7 @@ String IRMitsubishiAC::toString(void) const {
result += addBoolToString(_.Power, kPowerStr, false);
result += addModeToString(_.Mode, kMitsubishiAcAuto, kMitsubishiAcCool,
kMitsubishiAcHeat, kMitsubishiAcDry,
kMitsubishiAcAuto);
kMitsubishiAcFan);
result += addTempFloatToString(getTemp());
result += addFanToString(getFan(), kMitsubishiAcFanRealMax,
kMitsubishiAcFanRealMax - 3,
Expand Down
1 change: 1 addition & 0 deletions src/ir_Mitsubishi.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const uint8_t kMitsubishiAcAuto = 0b100;
const uint8_t kMitsubishiAcCool = 0b011;
const uint8_t kMitsubishiAcDry = 0b010;
const uint8_t kMitsubishiAcHeat = 0b001;
const uint8_t kMitsubishiAcFan = 0b111;
const uint8_t kMitsubishiAcFanAuto = 0;
const uint8_t kMitsubishiAcFanMax = 5;
const uint8_t kMitsubishiAcFanRealMax = 4;
Expand Down