Skip to content

Commit

Permalink
Change Dry and Heat fan speeds.
Browse files Browse the repository at this point in the history
* According to @soumaxetuirk : "In Dry mode FAN is restricted to "auto" 
instead of low. And heat mode FAN is restricted high only."
For: 
#1056 (comment)
  • Loading branch information
crankyoldgit committed Apr 5, 2020
1 parent f3cdf28 commit f8de5ce
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/ir_Hitachi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,16 @@ void IRHitachiAc1::setMode(const uint8_t mode) {
switch (mode) {
case kHitachiAc1Auto:
setTemp(kHitachiAc1TempAuto);
setFan(kHitachiAc1FanAuto, true);
// FALL THRU
case kHitachiAc1Dry:
case kHitachiAc1Fan:
case kHitachiAc1Heat:
case kHitachiAc1Cool:
case kHitachiAc1Dry:
setBits(&remote_state[kHitachiAc1ModeByte], kHitachiAc1ModeOffset,
kHitachiAc1ModeSize, mode);
setSleep(getSleep()); // Correct the sleep mode if required.
// Correct the sleep mode & fan speeds if required.
setSleep(getSleep());
setFan(getFan());
break;
default: setMode(kHitachiAc1Auto);
}
Expand Down Expand Up @@ -524,14 +525,18 @@ uint8_t IRHitachiAc1::getFan(void) {
void IRHitachiAc1::setFan(const uint8_t speed, const bool force) {
if (!force) {
switch (getMode()) {
case kHitachiAc1Auto:
case kHitachiAc1Dry: return; // Speed change not allowed in these modes.
case kHitachiAc1Auto: // These modes are resticted to Auto speed.
case kHitachiAc1Dry:
setFan(kHitachiAc1FanAuto, true);
return;
case kHitachiAc1Heat: // These modes are resticted to High speed.
setFan(kHitachiAc1FanHigh, true);
return;
}
}
switch (speed) {
case kHitachiAc1FanAuto:
switch (getMode()) {
case kHitachiAc1Heat:
case kHitachiAc1Fan: return; // Auto speed not allowed in these modes.
}
// FALL THRU
Expand Down

0 comments on commit f8de5ce

Please sign in to comment.