Skip to content

Commit

Permalink
Revert last commit.
Browse files Browse the repository at this point in the history
It appears there is a communcation problem

See: 
#1056 (comment) 
& 
#1056 (comment)
  • Loading branch information
crankyoldgit committed Apr 5, 2020
1 parent f8de5ce commit 7781e04
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/ir_Hitachi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,15 @@ 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);
// Correct the sleep mode & fan speeds if required.
setSleep(getSleep());
setFan(getFan());
setSleep(getSleep()); // Correct the sleep mode if required.
break;
default: setMode(kHitachiAc1Auto);
}
Expand Down Expand Up @@ -525,18 +524,14 @@ uint8_t IRHitachiAc1::getFan(void) {
void IRHitachiAc1::setFan(const uint8_t speed, const bool force) {
if (!force) {
switch (getMode()) {
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;
case kHitachiAc1Auto:
case kHitachiAc1Dry: return; // Speed change not allowed in these modes.
}
}
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 7781e04

Please sign in to comment.