Skip to content
52 changes: 39 additions & 13 deletions src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
#if SEND_TECO
case decode_type_t::TECO:
#endif
#if SEND_TEKNOPOINT
case decode_type_t::TEKNOPOINT:
#endif // SEND_TEKNOPOINT
#if SEND_TOSHIBA_AC
case decode_type_t::TOSHIBA_AC:
#endif
Expand Down Expand Up @@ -1942,6 +1945,7 @@ void IRac::sharp(IRSharpAc *ac, const sharp_ac_remote_model_t model,
#if SEND_TCL112AC
/// Send a TCL 112-bit A/C message with the supplied settings.
/// @param[in, out] ac A Ptr to an IRTcl112Ac object to use.
/// @param[in] model The A/C model to use.
/// @param[in] on The power setting.
/// @param[in] mode The operation mode setting.
/// @param[in] degrees The temperature setting in degrees.
Expand All @@ -1953,18 +1957,19 @@ void IRac::sharp(IRSharpAc *ac, const sharp_ac_remote_model_t model,
/// @param[in] light Turn on the LED/Display mode.
/// @param[in] econo Run the device in economical mode.
/// @param[in] filter Turn on the (ion/pollen/etc) filter mode.
void IRac::tcl112(IRTcl112Ac *ac,
void IRac::tcl112(IRTcl112Ac *ac, const tcl_ac_remote_model_t model,
const bool on, const stdAc::opmode_t mode,
const float degrees, const stdAc::fanspeed_t fan,
const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
const bool quiet, const bool turbo, const bool light,
const bool econo, const bool filter) {
ac->begin();
ac->setModel(model);
ac->setPower(on);
ac->setMode(ac->convertMode(mode));
ac->setTemp(degrees);
ac->setFan(ac->convertFan(fan));
ac->setSwingVertical(swingv != stdAc::swingv_t::kOff);
ac->setSwingVertical(ac->convertSwingV(swingv));
ac->setSwingHorizontal(swingh != stdAc::swingh_t::kOff);
ac->setQuiet(quiet);
ac->setTurbo(turbo);
Expand Down Expand Up @@ -2906,16 +2911,20 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
break;
}
#endif // SEND_SHARP_AC
#if SEND_TCL112AC
#if (SEND_TCL112AC || SEND_TEKNOPOINT)
case TCL112AC:
case TEKNOPOINT:
{
IRTcl112Ac ac(_pin, _inverted, _modulation);
tcl112(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.quiet, send.turbo, send.light, send.econo,
send.filter);
tcl_ac_remote_model_t model = (tcl_ac_remote_model_t)send.model;
if (send.protocol == decode_type_t::TEKNOPOINT)
model = tcl_ac_remote_model_t::GZ055BE1;
tcl112(&ac, model, send.power, send.mode,
degC, send.fanspeed, send.swingv, send.swingh, send.quiet,
send.turbo, send.light, send.econo, send.filter);
break;
}
#endif // SEND_TCL112AC
#endif // (SEND_TCL112AC || SEND_TEKNOPOINT)
#if SEND_TECHNIBEL_AC
case TECHNIBEL_AC:
{
Expand Down Expand Up @@ -3235,6 +3244,18 @@ int16_t IRac::strToModel(const char *str, const int16_t def) {
return panasonic_ac_remote_model_t::kPanasonicCkp;
} else if (!strcasecmp(str, "RKR") || !strcasecmp(str, "PANASONICRKR")) {
return panasonic_ac_remote_model_t::kPanasonicRkr;
// Sharp A/C Models
} else if (!strcasecmp(str, "A907")) {
return sharp_ac_remote_model_t::A907;
} else if (!strcasecmp(str, "A705")) {
return sharp_ac_remote_model_t::A705;
} else if (!strcasecmp(str, "A903")) {
return sharp_ac_remote_model_t::A903;
// TCL A/C Models
} else if (!strcasecmp(str, "TAC09CHSD")) {
return tcl_ac_remote_model_t::TAC09CHSD;
} else if (!strcasecmp(str, "GZ055BE1")) {
return tcl_ac_remote_model_t::GZ055BE1;
// Voltas A/C models
} else if (!strcasecmp(str, "122LZF")) {
return voltas_ac_remote_model_t::kVoltas122LZF;
Expand Down Expand Up @@ -3746,13 +3767,14 @@ namespace IRAcUtils {
return ac.toString();
}
#endif // DECODE_TECO
#if DECODE_TCL112AC
case decode_type_t::TCL112AC: {
#if (DECODE_TCL112AC || DECODE_TEKNOPOINT)
case decode_type_t::TCL112AC:
case decode_type_t::TEKNOPOINT: {
IRTcl112Ac ac(kGpioUnused);
ac.setRaw(result->state);
return ac.toString();
}
#endif // DECODE_TCL112AC
#endif // (DECODE_TCL112AC || DECODE_TEKNOPOINT)
#if DECODE_LG
case decode_type_t::LG:
case decode_type_t::LG2: {
Expand Down Expand Up @@ -4142,14 +4164,18 @@ namespace IRAcUtils {
break;
}
#endif // DECODE_SHARP_AC
#if DECODE_TCL112AC
case decode_type_t::TCL112AC: {
#if (DECODE_TCL112AC || DECODE_TEKNOPOINT)
case decode_type_t::TCL112AC:
case decode_type_t::TEKNOPOINT: {
IRTcl112Ac ac(kGpioUnused);
ac.setRaw(decode->state);
*result = ac.toCommon(prev);
// Teknopoint uses the TCL protocol, but with a different model number.
// Just keep the original protocol type ... for now.
result->protocol = decode->decode_type;
break;
}
#endif // DECODE_TCL112AC
#endif // (DECODE_TCL112AC || DECODE_TEKNOPOINT)
#if DECODE_TECHNIBEL_AC
case decode_type_t::TECHNIBEL_AC: {
IRTechnibelAc ac(kGpioUnused);
Expand Down
2 changes: 1 addition & 1 deletion src/IRac.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void electra(IRElectraAc *ac,
const bool filter, const bool clean);
#endif // SEND_SHARP_AC
#if SEND_TCL112AC
void tcl112(IRTcl112Ac *ac,
void tcl112(IRTcl112Ac *ac, const tcl_ac_remote_model_t model,
const bool on, const stdAc::opmode_t mode, const float degrees,
const stdAc::fanspeed_t fan,
const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
Expand Down
6 changes: 6 additions & 0 deletions src/IRsend.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ enum sharp_ac_remote_model_t {
A903 = 3, // 820 too
};

/// TCL A/C model numbers
enum tcl_ac_remote_model_t {
TAC09CHSD = 1,
GZ055BE1 = 2,
};

/// Voltas A/C model numbers
enum voltas_ac_remote_model_t {
kVoltasUnknown = 0, // Full Function
Expand Down
21 changes: 14 additions & 7 deletions src/IRutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,17 @@ namespace irutils {
default: return kUnknownStr;
}
break;
case decode_type_t::PANASONIC_AC:
switch (model) {
case panasonic_ac_remote_model_t::kPanasonicLke: return F("LKE");
case panasonic_ac_remote_model_t::kPanasonicNke: return F("NKE");
case panasonic_ac_remote_model_t::kPanasonicDke: return F("DKE");
case panasonic_ac_remote_model_t::kPanasonicJke: return F("JKE");
case panasonic_ac_remote_model_t::kPanasonicCkp: return F("CKP");
case panasonic_ac_remote_model_t::kPanasonicRkr: return F("RKR");
default: return kUnknownStr;
}
break;
case decode_type_t::SHARP_AC:
switch (model) {
case sharp_ac_remote_model_t::A907: return F("A907");
Expand All @@ -594,14 +605,10 @@ namespace irutils {
default: return kUnknownStr;
}
break;
case decode_type_t::PANASONIC_AC:
case decode_type_t::TCL112AC:
switch (model) {
case panasonic_ac_remote_model_t::kPanasonicLke: return F("LKE");
case panasonic_ac_remote_model_t::kPanasonicNke: return F("NKE");
case panasonic_ac_remote_model_t::kPanasonicDke: return F("DKE");
case panasonic_ac_remote_model_t::kPanasonicJke: return F("JKE");
case panasonic_ac_remote_model_t::kPanasonicCkp: return F("CKP");
case panasonic_ac_remote_model_t::kPanasonicRkr: return F("RKR");
case tcl_ac_remote_model_t::TAC09CHSD: return F("TAC09CHSD");
case tcl_ac_remote_model_t::GZ055BE1: return F("GZ055BE1");
default: return kUnknownStr;
}
break;
Expand Down
6 changes: 3 additions & 3 deletions src/ir_Mitsubishi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ void IRsend::sendMitsubishi112(const unsigned char data[],
}
#endif // SEND_MITSUBISHI112

#if DECODE_MITSUBISHI112 || DECODE_TCL112AC
#if (DECODE_MITSUBISHI112 || DECODE_TCL112AC)
/// Decode the supplied Mitsubishi/TCL 112-bit A/C message.
/// (MITSUBISHI112, TCL112AC)
/// Status: STABLE / Reported as working.
Expand Down Expand Up @@ -1212,7 +1212,7 @@ bool IRrecv::decodeMitsubishi112(decode_results *results, uint16_t offset,
gap = kMitsubishi112Gap;
}
#endif // DECODE_MITSUBISHI112
#if DECODE_TCL112AC
#if (DECODE_TCL112AC || DECODE_TEKNOPOINT)
if (typeguess == decode_type_t::UNKNOWN && // We didn't match Mitsubishi112
matchMark(results->rawbuf[offset], kTcl112AcHdrMark,
kTcl112AcHdrMarkTolerance, 0)) {
Expand All @@ -1224,7 +1224,7 @@ bool IRrecv::decodeMitsubishi112(decode_results *results, uint16_t offset,
gap = kTcl112AcGap;
tolerance += kTcl112AcTolerance;
}
#endif // DECODE_TCL112AC
#endif // (DECODE_TCL112AC || DECODE_TEKNOPOINT)
if (typeguess == decode_type_t::UNKNOWN) return false; // No header matched.
offset++;

Expand Down
Loading