Update IRRemote ESP8266 to 2.6.2 and add ESP32 support
This commit is contained in:
1 parent
2ee18320be
commit
24bcdbc97c
195 files changed
+22963
-4737
No files matched your search
@@ -18,6 +18,7 @@ TEST(TestSendToshibaAC, SendDataOnly) {
|
||||
irsend.reset();
|
||||
irsend.sendToshibaAC(toshiba_code);
|
||||
EXPECT_EQ(
|
||||
"f38000d50"
|
||||
"m4400s4300"
|
||||
"m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472"
|
||||
"m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623"
|
||||
@@ -54,6 +55,7 @@ TEST(TestSendToshibaAC, SendWithRepeats) {
|
||||
|
||||
irsend.sendToshibaAC(toshiba_code, kToshibaACStateLength, 0);
|
||||
EXPECT_EQ(
|
||||
"f38000d50"
|
||||
"m4400s4300"
|
||||
"m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472"
|
||||
"m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623"
|
||||
@@ -70,6 +72,7 @@ TEST(TestSendToshibaAC, SendWithRepeats) {
|
||||
irsend.reset();
|
||||
irsend.sendToshibaAC(toshiba_code, kToshibaACStateLength, 2);
|
||||
EXPECT_EQ(
|
||||
"f38000d50"
|
||||
"m4400s4300"
|
||||
"m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472"
|
||||
"m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623"
|
||||
@@ -122,6 +125,7 @@ TEST(TestSendToshibaAC, SendUnexpectedSizes) {
|
||||
irsend.reset();
|
||||
irsend.sendToshibaAC(toshiba_long_code, kToshibaACStateLength + 1);
|
||||
ASSERT_EQ(
|
||||
"f38000d50"
|
||||
"m4400s4300"
|
||||
"m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623"
|
||||
"m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s472"
|
||||
@@ -380,6 +384,7 @@ TEST(TestToshibaACClass, MessageConstuction) {
|
||||
irsend.reset();
|
||||
irsend.sendToshibaAC(toshiba.getRaw());
|
||||
EXPECT_EQ(
|
||||
"f38000d50"
|
||||
"m4400s4300"
|
||||
"m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472"
|
||||
"m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623"
|
||||
@@ -415,6 +420,7 @@ TEST(TestToshibaACClass, MessageConstuction) {
|
||||
irsend.reset();
|
||||
irsend.sendToshibaAC(toshiba.getRaw());
|
||||
EXPECT_EQ(
|
||||
"f38000d50"
|
||||
"m4400s4300"
|
||||
"m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472"
|
||||
"m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623"
|
||||
@@ -450,6 +456,7 @@ TEST(TestToshibaACClass, MessageConstuction) {
|
||||
irsend.reset();
|
||||
irsend.sendToshibaAC(toshiba.getRaw());
|
||||
EXPECT_EQ(
|
||||
"f38000d50"
|
||||
"m4400s4300"
|
||||
"m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472"
|
||||
"m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623"
|
||||
@@ -662,3 +669,31 @@ TEST(TestDecodeToshibaAC, RealExamples) {
|
||||
// sending the power off message.
|
||||
EXPECT_EQ(kToshibaAcHeat, toshiba.getMode());
|
||||
}
|
||||
|
||||
TEST(TestToshibaACClass, toCommon) {
|
||||
IRToshibaAC ac(0);
|
||||
ac.setPower(true);
|
||||
ac.setMode(kToshibaAcCool);
|
||||
ac.setTemp(20);
|
||||
ac.setFan(kToshibaAcFanMax);
|
||||
// Now test it.
|
||||
ASSERT_EQ(decode_type_t::TOSHIBA_AC, ac.toCommon().protocol);
|
||||
ASSERT_EQ(-1, ac.toCommon().model);
|
||||
ASSERT_TRUE(ac.toCommon().power);
|
||||
ASSERT_TRUE(ac.toCommon().celsius);
|
||||
ASSERT_EQ(20, ac.toCommon().degrees);
|
||||
ASSERT_EQ(stdAc::opmode_t::kCool, ac.toCommon().mode);
|
||||
ASSERT_EQ(stdAc::fanspeed_t::kMax, ac.toCommon().fanspeed);
|
||||
// Unsupported.
|
||||
ASSERT_EQ(stdAc::swingv_t::kOff, ac.toCommon().swingv);
|
||||
ASSERT_EQ(stdAc::swingh_t::kOff, ac.toCommon().swingh);
|
||||
ASSERT_FALSE(ac.toCommon().turbo);
|
||||
ASSERT_FALSE(ac.toCommon().econo);
|
||||
ASSERT_FALSE(ac.toCommon().light);
|
||||
ASSERT_FALSE(ac.toCommon().filter);
|
||||
ASSERT_FALSE(ac.toCommon().clean);
|
||||
ASSERT_FALSE(ac.toCommon().beep);
|
||||
ASSERT_FALSE(ac.toCommon().quiet);
|
||||
ASSERT_EQ(-1, ac.toCommon().sleep);
|
||||
ASSERT_EQ(-1, ac.toCommon().clock);
|
||||
}
|
||||
Reference in new issue
Block a user