Skip to content

Commit

Permalink
Add DAIKIN64 to decodeToState()
Browse files Browse the repository at this point in the history
Missed adding this when adding the rest of the commonAC api stuff.

FYI @chongkk

For 
#1064 (comment)
  • Loading branch information
crankyoldgit committed Mar 25, 2020
1 parent 4c45e74 commit c93b6f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2346,6 +2346,14 @@ namespace IRAcUtils {
break;
}
#endif // DECODE_DAIKIN216
#if DECODE_DAIKIN64
case decode_type_t::DAIKIN64: {
IRDaikin64 ac(kGpioUnused);
ac.setRaw(decode->value); // Uses value instead of state.
*result = ac.toCommon();
break;
}
#endif // DECODE_DAIKIN64
#if DECODE_ELECTRA_AC
case decode_type_t::ELECTRA_AC: {
IRElectraAc ac(kGpioUnused);
Expand Down
2 changes: 2 additions & 0 deletions test/ir_Daikin_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3437,6 +3437,8 @@ TEST(TestDecodeDaikin64, RealExample) {
"Turbo: Off, Quiet: Off, Swing(V): Off, Sleep: Off, "
"Clock: 07:20, On Timer: Off, Off Timer: Off",
IRAcUtils::resultAcToString(&irsend.capture));
stdAc::state_t result, prev;
ASSERT_TRUE(IRAcUtils::decodeToState(&irsend.capture, &result, &prev));
}

TEST(TestDecodeDaikin64, SyntheticExample) {
Expand Down

0 comments on commit c93b6f5

Please sign in to comment.