Skip to content

Commit

Permalink
Fix typo/bit-math-fail in kHitachiAc1Auto value.
Browse files Browse the repository at this point in the history
* Use `0bxxxx` notation so I don't make the same mistake for the rest of 
the modes,

Ref: 
#1056 (comment)
  • Loading branch information
crankyoldgit committed Apr 4, 2020
1 parent 2febeb8 commit 9ff836d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/ir_Hitachi.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ const uint8_t kHitachiAc1ModelSize = 2;
const uint8_t kHitachiAc1ModeByte = 5;
const uint8_t kHitachiAc1ModeOffset = 4;
const uint8_t kHitachiAc1ModeSize = 4; // Mask 0b11110000
const uint8_t kHitachiAc1Dry = 2; // 0b0010
const uint8_t kHitachiAc1Fan = 4; // 0b0100
const uint8_t kHitachiAc1Cool = 6; // 0b0110
const uint8_t kHitachiAc1Heat = 9; // 0b1001
const uint8_t kHitachiAc1Auto = 15; // 0b1110
const uint8_t kHitachiAc1Dry = 0b0010; // 2
const uint8_t kHitachiAc1Fan = 0b0100; // 4
const uint8_t kHitachiAc1Cool = 0b0110; // 6
const uint8_t kHitachiAc1Heat = 0b1001; // 9
const uint8_t kHitachiAc1Auto = 0b1110; // 14
const uint8_t kHitachiAc1FanByte = kHitachiAc1ModeByte;
const uint8_t kHitachiAc1FanOffset = 0;
const uint8_t kHitachiAc1FanSize = 4; // Mask 0b0001111
Expand Down
2 changes: 1 addition & 1 deletion test/IRac_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ TEST(TestIRac, Hitachi1) {
IRrecv capture(kGpioUnused);
char expected[] =
"Model: 1 (R-LT0541-HTA-A), Power: On, Power Toggle: Off, "
"Mode: 15 (Auto), Temp: 19C, Fan: 4 (Medium), "
"Mode: 14 (Auto), Temp: 19C, Fan: 4 (Medium), "
"Swing(V) Toggle: On, Swing(V): On, Swing(H): On, Sleep: 2, "
"On Timer: Off, Off Timer: Off";

Expand Down

0 comments on commit 9ff836d

Please sign in to comment.