Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support "I FEEL" button and sensor temperature for AC Royal Cli… #2135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/ir_Tcl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ using irutils::addModeToString;
using irutils::addModelToString;
using irutils::addSwingVToString;
using irutils::addTempFloatToString;
using irutils::addTempToString;
using irutils::minsToString;

#if SEND_TCL112AC
Expand Down Expand Up @@ -372,6 +373,26 @@ void IRTcl112Ac::setOffTimer(const uint16_t mins) {
_.TimerIndicator = _.OnTimerEnabled || _.OffTimerEnabled;
}

void IRTcl112Ac::setIFeel(const bool on)
{
_.IFeel = on;
}

bool IRTcl112Ac::getIFeel(void) const
{
return _.IFeel;
}

void IRTcl112Ac::setSensorTemp(const uint8_t celsius)
{
_.CurrentTemp = celsius;
}

uint8_t IRTcl112Ac::getSensorTemp(void) const
{
return _.CurrentTemp;
}

/// Convert a stdAc::opmode_t enum into its native mode.
/// @param[in] mode The enum to be converted.
/// @return The native equivalent of the enum.
Expand Down Expand Up @@ -515,6 +536,9 @@ String IRTcl112Ac::toString(void) const {
result += addBoolToString(_.Health, kHealthStr);
result += addBoolToString(_.Turbo, kTurboStr);
result += addBoolToString(getLight(), kLightStr);
result += addBoolToString(_.IFeel, kIFeelStr);
if (_.IFeel)
result += addTempToString(getSensorTemp(), true, true, true);
}
result += addLabeledString(
_.OnTimerEnabled ? minsToString(getOnTimer()) : kOffStr,
Expand Down
9 changes: 7 additions & 2 deletions src/ir_Tcl.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ union Tcl112Protocol{
uint8_t Mode :4;
uint8_t Health :1;
uint8_t Turbo :1;
uint8_t :2;
uint8_t :1;
uint8_t IFeel :1;
// Byte 7
uint8_t Temp :4;
uint8_t :4;
Expand All @@ -69,7 +70,7 @@ union Tcl112Protocol{
uint8_t OnTimer :6;
uint8_t :1; // 0
// Byte 11
uint8_t :8; // 00000000
uint8_t CurrentTemp :8; // IFEEL function
// Byte 12
uint8_t :3;
uint8_t SwingH :1;
Expand Down Expand Up @@ -174,6 +175,10 @@ class IRTcl112Ac {
void setOnTimer(const uint16_t mins);
uint16_t getOffTimer(void) const;
void setOffTimer(const uint16_t mins);
void setIFeel(const bool on);
bool getIFeel(void) const;
void setSensorTemp(const uint8_t celsius);
uint8_t getSensorTemp(void) const;
static bool isTcl(const uint8_t state[]);
static uint8_t convertMode(const stdAc::opmode_t mode);
static uint8_t convertFan(const stdAc::fanspeed_t speed);
Expand Down
Loading