Skip to content

Commit

Permalink
making some change on Daikin176bits to work with IRMQTTServer (#826)
Browse files Browse the repository at this point in the history
* modified fan setting Daikin176 to match remote
* Fix Fan/SwingH problem.
* Set Fan/Dry mode temp to 17C
* Fix another bit masking bug in setMode().
* Add unit test coverage for temp, mode, power, and swing.
* Add unit tests to verify against known-good remote data and try to
  reconstruct the messages.
* Use/enforce only two values for fan speed.
* Use the new common routines in `toString()`.
* Add the fan speed and swing to the default/reset state.
* Simplify some code.
* Handle mode setting better.
* remove Auto and Heat modes. Not supported.
* Default to cool mode.
* Handle internal message formation for modes better.
* Better handle modes for common a/c stuff
  • Loading branch information
pasna authored and crankyoldgit committed Jul 26, 2019
1 parent 9855f4d commit 7603a5b
Show file tree
Hide file tree
Showing 7 changed files with 406 additions and 117 deletions.
39 changes: 39 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
IRArgoAC KEYWORD1
IRCoolixAC KEYWORD1
IRDaikin160 KEYWORD1
IRDaikin176 KEYWORD1
IRDaikin2 KEYWORD1
IRDaikin216 KEYWORD1
IRDaikinESP KEYWORD1
Expand Down Expand Up @@ -109,6 +110,7 @@ copyIrParams KEYWORD2
countBits KEYWORD2
daikin KEYWORD2
daikin160 KEYWORD2
daikin176 KEYWORD2
daikin2 KEYWORD2
daikin216 KEYWORD2
decode KEYWORD2
Expand All @@ -119,6 +121,7 @@ decodeCarrierAC KEYWORD2
decodeDISH KEYWORD2
decodeDaikin KEYWORD2
decodeDaikin160 KEYWORD2
decodeDaikin176 KEYWORD2
decodeDaikin2 KEYWORD2
decodeDaikin216 KEYWORD2
decodeDenon KEYWORD2
Expand Down Expand Up @@ -343,6 +346,7 @@ sendCarrierAC KEYWORD2
sendDISH KEYWORD2
sendDaikin KEYWORD2
sendDaikin160 KEYWORD2
sendDaikin176 KEYWORD2
sendDaikin2 KEYWORD2
sendDaikin216 KEYWORD2
sendData KEYWORD2
Expand Down Expand Up @@ -554,6 +558,7 @@ COOLIX LITERAL1
COOLIX_BITS LITERAL1
DAIKIN LITERAL1
DAIKIN160 LITERAL1
DAIKIN176 LITERAL1
DAIKIN2 LITERAL1
DAIKIN216 LITERAL1
DAIKIN_AUTO LITERAL1
Expand All @@ -575,6 +580,7 @@ DECODE_CARRIER_AC LITERAL1
DECODE_COOLIX LITERAL1
DECODE_DAIKIN LITERAL1
DECODE_DAIKIN160 LITERAL1
DECODE_DAIKIN176 LITERAL1
DECODE_DAIKIN2 LITERAL1
DECODE_DAIKIN216 LITERAL1
DECODE_DENON LITERAL1
Expand Down Expand Up @@ -861,6 +867,7 @@ SEND_CARRIER_AC LITERAL1
SEND_COOLIX LITERAL1
SEND_DAIKIN LITERAL1
SEND_DAIKIN160 LITERAL1
SEND_DAIKIN176 LITERAL1
SEND_DAIKIN2 LITERAL1
SEND_DAIKIN216 LITERAL1
SEND_DENON LITERAL1
Expand Down Expand Up @@ -1094,6 +1101,38 @@ kDaikin160SwingVLow LITERAL1
kDaikin160SwingVLowest LITERAL1
kDaikin160SwingVMiddle LITERAL1
kDaikin160ZeroSpace LITERAL1
kDaikin176MinTemp LITERAL1
kDaikin176Cool LITERAL1
kDaikin176BitMark LITERAL1
kDaikin176Bits LITERAL1
kDaikin176ByteFan LITERAL1
kDaikin176ByteMode LITERAL1
kDaikin176BytePower LITERAL1
kDaikin176ByteSwingH LITERAL1
kDaikin176ByteSwingV LITERAL1
kDaikin176ByteTemp LITERAL1
kDaikin176DefaultRepeat LITERAL1
kDaikin176Freq LITERAL1
kDaikin176Gap LITERAL1
kDaikin176HdrMark LITERAL1
kDaikin176HdrSpace LITERAL1
kDaikin176MaskFan LITERAL1
kDaikin176MaskMode LITERAL1
kDaikin176MaskSwingH LITERAL1
kDaikin176MaskSwingV LITERAL1
kDaikin176MaskTemp LITERAL1
kDaikin176OneSpace LITERAL1
kDaikin176Section1Length LITERAL1
kDaikin176Section2Length LITERAL1
kDaikin176Sections LITERAL1
kDaikin176StateLength LITERAL1
kDaikin176ZeroSpace LITERAL1
kDaikin176SwingVHigh LITERAL1
kDaikin176SwingVLow LITERAL1
kDaikin176SwingVAuto LITERAL1
kDaikin176SwingHAuto LITERAL1
kDaikin176SwingHOff LITERAL1
kDaikin176FanMax LITERAL1
kDaikin216BitMark LITERAL1
kDaikin216Bits LITERAL1
kDaikin216ByteFan LITERAL1
Expand Down
2 changes: 1 addition & 1 deletion src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ bool IRac::sendAc(const decode_type_t vendor, const int16_t model,
#if SEND_DAIKIN176
case DAIKIN176:
{
IRDaikin176 ac(_pin);
IRDaikin176 ac(_pin, _inverted, _modulation);
daikin176(&ac, on, mode, degC, fan, swingh);
break;
}
Expand Down
6 changes: 3 additions & 3 deletions src/IRsend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ uint16_t IRsend::defaultBits(const decode_type_t protocol) {
case DAIKIN160:
return kDaikin160Bits;
case DAIKIN176:
return kDaikin176Bits;
return kDaikin176Bits;
case DAIKIN2:
return kDaikin2Bits;
case DAIKIN216:
Expand Down Expand Up @@ -863,8 +863,8 @@ bool IRsend::send(const decode_type_t type, const unsigned char *state,
#endif // SEND_DAIKIN160
#if SEND_DAIKIN176
case DAIKIN176:
sendDaikin176(state, nbytes);
break;
sendDaikin176(state, nbytes);
break;
#endif // SEND_DAIKIN176
#if SEND_DAIKIN2
case DAIKIN2:
Expand Down
Loading

0 comments on commit 7603a5b

Please sign in to comment.