Skip to content

Commit

Permalink
IRac::isProtocolSupported() — do not list WHIRLPOOL_AC unconditionall…
Browse files Browse the repository at this point in the history
…y as supported protocol (#2003)

It is reported as such when in Tasmota the command IRHVAC {"Vendor":"ABC"} is sent.

Build examples platformio.ini files updated where a fatal warning is generated when no protocols are enabled.

---------

Co-authored-by: David Conran <[email protected]>
  • Loading branch information
dilyanpalauzov and crankyoldgit authored Jun 9, 2023
1 parent 4e4b158 commit 8082175
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/IRrecvDumpV2/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ build_flags = -D_IR_LOCALE_=zh-CN ; Chinese (Simplified)
; Build the library with all protocols disabled to flush out #if/#ifdef issues &
; any compiler warnings, by turning them into errors.
[env:shakedown_no_protocols]
build_flags = -D_IR_ENABLE_DEFAULT_=false -Werror -Wno-error=switch
build_flags =
${env.build_flags}
-Werror
-Wno-error=switch
-Wno-error=switch-unreachable
-D_IR_ENABLE_DEFAULT_=false
1 change: 1 addition & 0 deletions examples/SmartIRRepeater/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ build_flags =
${env.build_flags}
-Werror
-Wno-error=switch
-Wno-error=switch-unreachable
-D_IR_ENABLE_DEFAULT_=false
2 changes: 2 additions & 0 deletions src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
#if SEND_YORK
case decode_type_t::YORK:
#endif
#if SEND_WHIRLPOOL_AC
case decode_type_t::WHIRLPOOL_AC:
#endif
return true;
default:
return false;
Expand Down

0 comments on commit 8082175

Please sign in to comment.