Skip to content

Commit

Permalink
Update Kaysun supported models. (crankyoldgit#1322)
Browse files Browse the repository at this point in the history
* Verify `sendMidea(0xA4A3477F1979)` decodes properly.

Ref: crankyoldgit#1318 (comment)
For crankyoldgit#1318

* Update supported Kaysun remote models.
For crankyoldgit#1318
  • Loading branch information
crankyoldgit authored Nov 5, 2020
1 parent 9f19d55 commit f157685
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ir_Coolix.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// Brand: Midea, Model: MSABAU-07HRFN1-QRD0GW A/C (circa 2016)
// Brand: Tokio, Model: AATOEMF17-12CHR1SW split-type RG51|50/BGE Remote
// Brand: Airwell, Model: RC08B remote
// Brand: Kaysun, Model: RG57A7/BGEF remote

#ifndef IR_COOLIX_H_
#define IR_COOLIX_H_
Expand Down
1 change: 1 addition & 0 deletions src/ir_Midea.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// Brand: Pioneer System, Model: RUBO18GMFILCAD A/C (18K BTU) (MIDEA)
// Brand: Comfee, Model: MPD1-12CRN7 A/C (MIDEA)
// Brand: Keystone, Model: RG57H4(B)BGEF remote (MIDEA)
// Brand: Kaysun, Model: RG57A6/BGEFU1 remote (MIDEA)
// Brand: Midea, Model: FS40-7AR Stand Fan (MIDEA24)
// Brand: Danby, Model: DAC080BGUWDB (MIDEA)
// Brand: Danby, Model: DAC100BGUWDB (MIDEA)
Expand Down
41 changes: 41 additions & 0 deletions test/ir_Midea_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,3 +971,44 @@ TEST(TestDecodeMidea24, LargeTimeout) {
EXPECT_EQ(0, irsend.capture.address);
EXPECT_EQ(0, irsend.capture.command);
}

// Verify the library can self-decode `sendMidea(0xA4A3477F1979)` to the correct
// value.
// Ref: https://github.com/crankyoldgit/IRremoteESP8266/issues/1318#issuecomment-721829757
TEST(TestDecodeMidea, Issue1318_self_decode) {
IRsendTest irsend(kGpioUnused);
IRrecv irrecv(kGpioUnused);
irsend.begin();
irsend.reset();
irsend.sendMidea(0xA4A3477F1979);
irsend.makeDecodeResult();
ASSERT_TRUE(irrecv.decode(&irsend.capture));
EXPECT_EQ(MIDEA, irsend.capture.decode_type);
EXPECT_EQ(kMideaBits, irsend.capture.bits);
EXPECT_EQ(0xA4A3477F1979, irsend.capture.value);
EXPECT_EQ(0, irsend.capture.address);
EXPECT_EQ(0, irsend.capture.command);
EXPECT_EQ(
"Power: On, Mode: 3 (Heat), Celsius: On, Temp: 24C/75F, Fan: 0 (Auto), "
"Sleep: Off, Swing(V) Toggle: Off, Econo Toggle: Off",
IRAcUtils::resultAcToString(&irsend.capture));
EXPECT_EQ(
"f38000d50"
"m4480s4480m560s1680m560s560m560s1680m560s560m560s560m560s1680"
"m560s560m560s560m560s1680m560s560m560s1680m560s560m560s560"
"m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560"
"m560s560m560s1680m560s1680m560s1680m560s560m560s1680m560s1680"
"m560s1680m560s1680m560s1680m560s1680m560s1680m560s560m560s560"
"m560s560m560s1680m560s1680m560s560m560s560m560s1680m560s560"
"m560s1680m560s1680m560s1680m560s1680m560s560m560s560m560s1680"
"m560s5600"
"m4480s4480m560s560m560s1680m560s560m560s1680m560s1680m560s560"
"m560s1680m560s1680m560s560m560s1680m560s560m560s1680m560s1680"
"m560s1680m560s560m560s560m560s1680m560s560m560s1680m560s1680"
"m560s1680m560s560m560s560m560s560m560s1680m560s560m560s560"
"m560s560m560s560m560s560m560s560m560s560m560s1680m560s1680"
"m560s1680m560s560m560s560m560s1680m560s1680m560s560m560s1680"
"m560s560m560s560m560s560m560s560m560s1680m560s1680m560s560"
"m560s5600",
irsend.outputStr());
}

0 comments on commit f157685

Please sign in to comment.