Skip to content

Commit ecccc3a

Browse files
committed
fix: build tests
1 parent d6bf0c6 commit ecccc3a

File tree

5 files changed

+34
-8
lines changed

5 files changed

+34
-8
lines changed

src/IRac.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
245245
case decode_type_t::ELECTRA_AC:
246246
#endif
247247
#if SEND_ELECTROLUX_AC
248-
case decode_type_t::ELETROLUX_AC:
248+
case decode_type_t::ELECTROLUX_AC:
249249
#endif // SEND_ELECTROLUX_AC
250250
#if SEND_FUJITSU_AC
251251
case decode_type_t::FUJITSU_AC:
@@ -3678,7 +3678,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
36783678
}
36793679
#endif // SEND_TRANSCOLD_AC
36803680
#if SEND_ELECTROLUX_AC
3681-
case ELETROLUX_AC:
3681+
case ELECTROLUX_AC:
36823682
{
36833683
IRElectroluxAc ac(_pin, _inverted, _modulation);
36843684
electrolux(&ac, send.power, send.mode,
@@ -4567,7 +4567,7 @@ namespace IRAcUtils {
45674567
}
45684568
#endif // DECODE_YORK
45694569
#if DECODE_ELECTROLUX_AC
4570-
case decode_type_t::ELETROLUX_AC: {
4570+
case decode_type_t::ELECTROLUX_AC: {
45714571
IRElectroluxAc ac(kGpioUnused);
45724572
ac.setRaw(result->value); // ELETROLUX_AC uses value instead of state.
45734573
return ac.toString();
@@ -5118,7 +5118,7 @@ namespace IRAcUtils {
51185118
}
51195119
#endif // DECODE_YORK
51205120
#if DECODE_ELECTROLUX_AC
5121-
case decode_type_t::ELETROLUX_AC: {
5121+
case decode_type_t::ELECTROLUX_AC: {
51225122
IRCarrierAc64 ac(kGpioUnused);
51235123
ac.setRaw(decode->value); // Uses value instead of state.
51245124
*result = ac.toCommon();

src/IRremoteESP8266.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,9 +1152,9 @@ enum decode_type_t {
11521152
CARRIER_AC84, // 125
11531153
YORK,
11541154
BLUESTARHEAVY,
1155-
ELETROLUX_AC,
1155+
ELECTROLUX_AC,
11561156
// Add new entries before this one, and update it to point to the last entry.
1157-
kLastDecodeType = ELETROLUX_AC,
1157+
kLastDecodeType = ELECTROLUX_AC,
11581158
};
11591159

11601160
// Message lengths & required repeat values

src/IRsend.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ uint16_t IRsend::minRepeats(const decode_type_t protocol) {
562562
case COOLIX:
563563
case COOLIX48:
564564
case ELITESCREENS:
565+
case ELECTROLUX_AC:
565566
case GICABLE:
566567
case INAX:
567568
case MIDEA24:
@@ -646,6 +647,7 @@ uint16_t IRsend::defaultBits(const decode_type_t protocol) {
646647
case ARRIS:
647648
case CARRIER_AC:
648649
case ELITESCREENS:
650+
case ELECTROLUX_AC:
649651
case EPSON:
650652
case NEC:
651653
case NEC_LIKE:
@@ -915,6 +917,11 @@ bool IRsend::send(const decode_type_t type, const uint64_t data,
915917
sendEpson(data, nbits, min_repeat);
916918
break;
917919
#endif
920+
#if SEND_ELECTROLUX_AC
921+
case ELECTROLUX_AC:
922+
sendElectroluxAc(data, nbits, min_repeat);
923+
break;
924+
#endif
918925
#if SEND_GICABLE
919926
case GICABLE:
920927
sendGICable(data, nbits, min_repeat);

src/ir_Electrolux.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ bool IRrecv::decodeElectroluxAc(
102102
return false;
103103

104104
// Success
105-
results->decode_type = decode_type_t::ELETROLUX_AC;
105+
results->decode_type = decode_type_t::ELECTROLUX_AC;
106106
results->bits = nbits;
107107
results->value = data;
108108
results->command = data & 0xFFF;
@@ -373,7 +373,7 @@ stdAc::state_t IRElectroluxAc::toCommon(const stdAc::state_t *prev) const {
373373
// e.g. Any setting that toggles should probably go here.
374374
result.power = false;
375375
}
376-
result.protocol = ELETROLUX_AC;
376+
result.protocol = ELECTROLUX_AC;
377377
result.power = _.Power;
378378
result.mode = toCommonMode(_.Mode);
379379
result.celsius = !getTempModeFahrenheit();

test/ir_Electrolux_test.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2024 Andrey Kravchenko (StellaLupus)
2+
3+
#include "ir_Electrolux.h"
4+
#include "IRac.h"
5+
#include "IRrecv.h"
6+
#include "IRrecv_test.h"
7+
#include "IRsend.h"
8+
#include "IRsend_test.h"
9+
#include "gtest/gtest.h"
10+
11+
12+
TEST(TestUtils, Housekeeping) {
13+
ASSERT_EQ("ELETROLUX_AC", typeToString(decode_type_t::ELECTROLUX_AC));
14+
ASSERT_EQ(decode_type_t::ELECTROLUX_AC, strToDecodeType("ELETROLUX_AC"));
15+
ASSERT_FALSE(hasACState(decode_type_t::ELECTROLUX_AC));
16+
ASSERT_TRUE(IRac::isProtocolSupported(decode_type_t::ELECTROLUX_AC));
17+
ASSERT_EQ(kElectroluxAcBits, IRsend::defaultBits(decode_type_t::ELECTROLUX_AC));
18+
ASSERT_EQ(kElectroluxAcDefaultRepeat, IRsend::minRepeats(decode_type_t::ELECTROLUX_AC));
19+
}

0 commit comments

Comments
 (0)