Skip to content

Commit 9092a5b

Browse files
committedAug 10, 2024
fix: build tests
fix: code cleanup and formatting fix: test build
1 parent b198a53 commit 9092a5b

10 files changed

+423
-398
lines changed
 

‎src/IRac.cpp

+9-7
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
244244
#if SEND_ELECTRA_AC
245245
case decode_type_t::ELECTRA_AC:
246246
#endif
247+
#if SEND_ELECTROLUX_AC
248+
case decode_type_t::ELECTROLUX_AC:
249+
#endif // SEND_ELECTROLUX_AC
247250
#if SEND_FUJITSU_AC
248251
case decode_type_t::FUJITSU_AC:
249252
#endif
@@ -375,9 +378,6 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
375378
#if SEND_WHIRLPOOL_AC
376379
case decode_type_t::WHIRLPOOL_AC:
377380
#endif
378-
#if SEND_ELECTROLUX_AC
379-
case decode_type_t::ELETROLUX_AC:
380-
#endif // SEND_ELECTROLUX_AC
381381
return true;
382382
default:
383383
return false;
@@ -3678,10 +3678,12 @@ 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);
3684-
electrolux(&ac, send.power, send.mode, send.celsius, send.degrees, send.fanspeed, send.quiet);
3684+
electrolux(&ac, send.power, send.mode,
3685+
send.celsius, send.degrees,
3686+
send.fanspeed, send.quiet);
36853687
break;
36863688
}
36873689
#endif // SEND_ELECTROLUX_AC
@@ -4565,7 +4567,7 @@ namespace IRAcUtils {
45654567
}
45664568
#endif // DECODE_YORK
45674569
#if DECODE_ELECTROLUX_AC
4568-
case decode_type_t::ELETROLUX_AC: {
4570+
case decode_type_t::ELECTROLUX_AC: {
45694571
IRElectroluxAc ac(kGpioUnused);
45704572
ac.setRaw(result->value); // ELETROLUX_AC uses value instead of state.
45714573
return ac.toString();
@@ -5116,7 +5118,7 @@ namespace IRAcUtils {
51165118
}
51175119
#endif // DECODE_YORK
51185120
#if DECODE_ELECTROLUX_AC
5119-
case decode_type_t::ELETROLUX_AC: {
5121+
case decode_type_t::ELECTROLUX_AC: {
51205122
IRCarrierAc64 ac(kGpioUnused);
51215123
ac.setRaw(decode->value); // Uses value instead of state.
51225124
*result = ac.toCommon();

‎src/IRac.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "ir_Fujitsu.h"
2323
#include "ir_Ecoclim.h"
2424
#include "ir_Electra.h"
25+
#include "ir_Electrolux.h"
2526
#include "ir_Goodweather.h"
2627
#include "ir_Gree.h"
2728
#include "ir_Haier.h"
@@ -50,7 +51,6 @@
5051
#include "ir_Voltas.h"
5152
#include "ir_Whirlpool.h"
5253
#include "ir_York.h"
53-
#include "ir_Electrolux.h"
5454

5555
// Constants
5656
const int8_t kGpioUnused = -1; ///< A placeholder for not using an actual GPIO.

‎src/IRrecv.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ bool IRrecv::decode(decode_results *results, irparams_t *save,
11921192
#if DECODE_ELECTROLUX_AC
11931193
DPRINTLN("Attempting Electrolux AC decode");
11941194
if (decodeElectroluxAc(results, offset)) return true;
1195-
#endif //DECODE_ELECTROLUX_AC
1195+
#endif // DECODE_ELECTROLUX_AC
11961196
// Typically new protocols are added above this line.
11971197
}
11981198
#if DECODE_HASH

‎src/IRrecv.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -890,10 +890,11 @@ class IRrecv {
890890
const bool strict = true);
891891
#endif // DECODE_BLUESTARHEAVY
892892
#if DECODE_ELECTROLUX_AC
893-
bool decodeElectroluxAc(decode_results *results, uint16_t offset = kStartOffset,
894-
const uint16_t nbits = kElectroluxAcBits,
895-
const bool strict = true);
896-
#endif // DECODE_ELECTROLUX_AC
893+
bool decodeElectroluxAc(decode_results *results,
894+
uint16_t offset = kStartOffset,
895+
const uint16_t nbits = kElectroluxAcBits,
896+
const bool strict = true);
897+
#endif // DECODE_ELECTROLUX_AC
897898
};
898899

899900
#endif // IRRECV_H_

‎src/IRremoteESP8266.h

+2-2
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

+7
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);

0 commit comments

Comments
 (0)
Failed to load comments.