Minor cleanups of Corona and Zepeal

This commit is contained in:
Christian Nilsson
2020-06-12 06:13:35 +02:00
parent 6f3a5d561a
commit 84fed74830
3 changed files with 13 additions and 12 deletions

View File

@@ -648,12 +648,6 @@
#ifndef SEND_MULTIBRACKETS #ifndef SEND_MULTIBRACKETS
#define SEND_MULTIBRACKETS _IR_ENABLE_DEFAULT_ #define SEND_MULTIBRACKETS _IR_ENABLE_DEFAULT_
#endif // SEND_MULTIBRACKETS #endif // SEND_MULTIBRACKETS
#ifndef DECODE_ZEPEAL
#define DECODE_ZEPEAL _IR_ENABLE_DEFAULT_
#endif // DECODE_ZEPEAL
#ifndef SEND_ZEPEAL
#define SEND_ZEPEAL _IR_ENABLE_DEFAULT_
#endif // SEND_ZEPEAL
#ifndef DECODE_CORONA_AC #ifndef DECODE_CORONA_AC
#define DECODE_CORONA_AC _IR_ENABLE_DEFAULT_ #define DECODE_CORONA_AC _IR_ENABLE_DEFAULT_
@@ -662,6 +656,13 @@
#define SEND_CORONA_AC _IR_ENABLE_DEFAULT_ #define SEND_CORONA_AC _IR_ENABLE_DEFAULT_
#endif // SEND_CORONA_AC #endif // SEND_CORONA_AC
#ifndef DECODE_ZEPEAL
#define DECODE_ZEPEAL _IR_ENABLE_DEFAULT_
#endif // DECODE_ZEPEAL
#ifndef SEND_ZEPEAL
#define SEND_ZEPEAL _IR_ENABLE_DEFAULT_
#endif // SEND_ZEPEAL
#if (DECODE_ARGO || DECODE_DAIKIN || DECODE_FUJITSU_AC || DECODE_GREE || \ #if (DECODE_ARGO || DECODE_DAIKIN || DECODE_FUJITSU_AC || DECODE_GREE || \
DECODE_KELVINATOR || DECODE_MITSUBISHI_AC || DECODE_TOSHIBA_AC || \ DECODE_KELVINATOR || DECODE_MITSUBISHI_AC || DECODE_TOSHIBA_AC || \
DECODE_TROTEC || DECODE_HAIER_AC || DECODE_HITACHI_AC || \ DECODE_TROTEC || DECODE_HAIER_AC || DECODE_HITACHI_AC || \

View File

@@ -194,7 +194,7 @@ bool IRCoronaAc::validSection(const uint8_t state[], const uint16_t pos,
// all individual sections has the same prefix // all individual sections has the same prefix
if (state[pos + kCoronaAcSectionHeader0Pos] != kCoronaAcSectionHeader0) { if (state[pos + kCoronaAcSectionHeader0Pos] != kCoronaAcSectionHeader0) {
DPRINT("State "); DPRINT("State ");
DPRINT(pos); DPRINT(pos + kCoronaAcSectionHeader0Pos);
DPRINT(" expected 0x28 was "); DPRINT(" expected 0x28 was ");
DPRINTLN(uint64ToString(state[pos + kCoronaAcSectionHeader0Pos], 16)); DPRINTLN(uint64ToString(state[pos + kCoronaAcSectionHeader0Pos], 16));
return false; return false;

View File

@@ -25,7 +25,7 @@ TEST(TestDecodeZepeal, RealExample) {
irsend.sendRaw(rawData_1, 35, 38); irsend.sendRaw(rawData_1, 35, 38);
irsend.makeDecodeResult(); irsend.makeDecodeResult();
ASSERT_TRUE(irrecv.decodeZepeal(&irsend.capture)); ASSERT_TRUE(irrecv.decode(&irsend.capture));
ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type); ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type);
ASSERT_EQ(kZepealBits, irsend.capture.bits); ASSERT_EQ(kZepealBits, irsend.capture.bits);
EXPECT_EQ(0x6C82, irsend.capture.value); EXPECT_EQ(0x6C82, irsend.capture.value);
@@ -70,7 +70,7 @@ TEST(TestDecodeZepeal, RealExample) {
irsend.sendRaw(rawData_2, 179, 38); irsend.sendRaw(rawData_2, 179, 38);
irsend.makeDecodeResult(); irsend.makeDecodeResult();
ASSERT_TRUE(irrecv.decodeZepeal(&irsend.capture)); ASSERT_TRUE(irrecv.decode(&irsend.capture));
ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type); ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type);
ASSERT_EQ(kZepealBits, irsend.capture.bits); ASSERT_EQ(kZepealBits, irsend.capture.bits);
EXPECT_EQ(0x6C81, irsend.capture.value); EXPECT_EQ(0x6C81, irsend.capture.value);
@@ -132,7 +132,7 @@ TEST(TestDecodeZepeal, RealExample) {
irsend.sendRaw(rawData_3, 143, 38); irsend.sendRaw(rawData_3, 143, 38);
irsend.makeDecodeResult(); irsend.makeDecodeResult();
ASSERT_TRUE(irrecv.decodeZepeal(&irsend.capture)); ASSERT_TRUE(irrecv.decode(&irsend.capture));
ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type); ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type);
ASSERT_EQ(kZepealBits, irsend.capture.bits); ASSERT_EQ(kZepealBits, irsend.capture.bits);
EXPECT_EQ(0x6C84, irsend.capture.value); EXPECT_EQ(0x6C84, irsend.capture.value);
@@ -170,7 +170,7 @@ TEST(TestDecodeZepeal, RealExample) {
irsend.sendRaw(rawData_4, 143, 38); irsend.sendRaw(rawData_4, 143, 38);
irsend.makeDecodeResult(); irsend.makeDecodeResult();
ASSERT_TRUE(irrecv.decodeZepeal(&irsend.capture)); ASSERT_TRUE(irrecv.decode(&irsend.capture));
ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type); ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type);
ASSERT_EQ(kZepealBits, irsend.capture.bits); ASSERT_EQ(kZepealBits, irsend.capture.bits);
EXPECT_EQ(0x6C88, irsend.capture.value); EXPECT_EQ(0x6C88, irsend.capture.value);
@@ -208,7 +208,7 @@ TEST(TestDecodeZepeal, RealExample) {
irsend.sendRaw(rawData_5, 143, 38); irsend.sendRaw(rawData_5, 143, 38);
irsend.makeDecodeResult(); irsend.makeDecodeResult();
ASSERT_TRUE(irrecv.decodeZepeal(&irsend.capture)); ASSERT_TRUE(irrecv.decode(&irsend.capture));
ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type); ASSERT_EQ(decode_type_t::ZEPEAL, irsend.capture.decode_type);
ASSERT_EQ(kZepealBits, irsend.capture.bits); ASSERT_EQ(kZepealBits, irsend.capture.bits);
EXPECT_EQ(0x6CC3, irsend.capture.value); EXPECT_EQ(0x6CC3, irsend.capture.value);