Skip to content

Commit

Permalink
fix: code cleanup and formatting
Browse files Browse the repository at this point in the history
fix: test build
  • Loading branch information
StellaLupus committed Aug 10, 2024
1 parent b198a53 commit c7d5622
Show file tree
Hide file tree
Showing 7 changed files with 392 additions and 393 deletions.
10 changes: 6 additions & 4 deletions src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
#if SEND_ELECTRA_AC
case decode_type_t::ELECTRA_AC:
#endif
#if SEND_ELECTROLUX_AC
case decode_type_t::ELETROLUX_AC:
#endif // SEND_ELECTROLUX_AC
#if SEND_FUJITSU_AC
case decode_type_t::FUJITSU_AC:
#endif
Expand Down Expand Up @@ -375,9 +378,6 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
#if SEND_WHIRLPOOL_AC
case decode_type_t::WHIRLPOOL_AC:
#endif
#if SEND_ELECTROLUX_AC
case decode_type_t::ELETROLUX_AC:
#endif // SEND_ELECTROLUX_AC
return true;
default:
return false;
Expand Down Expand Up @@ -3681,7 +3681,9 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case ELETROLUX_AC:
{
IRElectroluxAc ac(_pin, _inverted, _modulation);
electrolux(&ac, send.power, send.mode, send.celsius, send.degrees, send.fanspeed, send.quiet);
electrolux(&ac, send.power, send.mode,
send.celsius, send.degrees,
send.fanspeed, send.quiet);
break;
}
#endif // SEND_ELECTROLUX_AC
Expand Down
2 changes: 1 addition & 1 deletion src/IRac.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "ir_Fujitsu.h"
#include "ir_Ecoclim.h"
#include "ir_Electra.h"
#include "ir_Electrolux.h"
#include "ir_Goodweather.h"
#include "ir_Gree.h"
#include "ir_Haier.h"
Expand Down Expand Up @@ -50,7 +51,6 @@
#include "ir_Voltas.h"
#include "ir_Whirlpool.h"
#include "ir_York.h"
#include "ir_Electrolux.h"

// Constants
const int8_t kGpioUnused = -1; ///< A placeholder for not using an actual GPIO.
Expand Down
2 changes: 1 addition & 1 deletion src/IRrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ bool IRrecv::decode(decode_results *results, irparams_t *save,
#if DECODE_ELECTROLUX_AC
DPRINTLN("Attempting Electrolux AC decode");
if (decodeElectroluxAc(results, offset)) return true;
#endif //DECODE_ELECTROLUX_AC
#endif // DECODE_ELECTROLUX_AC
// Typically new protocols are added above this line.
}
#if DECODE_HASH
Expand Down
9 changes: 5 additions & 4 deletions src/IRrecv.h
Original file line number Diff line number Diff line change
Expand Up @@ -890,10 +890,11 @@ class IRrecv {
const bool strict = true);
#endif // DECODE_BLUESTARHEAVY
#if DECODE_ELECTROLUX_AC
bool decodeElectroluxAc(decode_results *results, uint16_t offset = kStartOffset,
const uint16_t nbits = kElectroluxAcBits,
const bool strict = true);
#endif // DECODE_ELECTROLUX_AC
bool decodeElectroluxAc(decode_results *results,
uint16_t offset = kStartOffset,
const uint16_t nbits = kElectroluxAcBits,
const bool strict = true);
#endif // DECODE_ELECTROLUX_AC
};

#endif // IRRECV_H_
Loading

0 comments on commit c7d5622

Please sign in to comment.