Go to the documentation of this file.
27 #include "IRsend_test.h"
79 explicit IRKelonAc(uint16_t pin,
bool inverted =
false,
80 bool use_modulation =
true);
100 void setTemp(
const uint8_t degrees);
102 void setFan(
const uint8_t speed);
103 uint8_t
getFan(
void)
const;
106 void setMode(
const uint8_t mode);
118 uint64_t
getRaw(
void)
const;
119 void setRaw(
const uint64_t new_code);
142 #endif // IR_KELON_H_
uint8_t getMode(void) const
Get the current operation mode setting.
Definition: ir_Kelon.cpp:256
bool getSleep(void) const
Is the sleep setting on?
Definition: ir_Kelon.cpp:274
void ensurePower(const bool on)
Since the AC does not support actually setting the power state to a known value, this utility allow e...
Definition: ir_Kelon.cpp:130
void setRaw(const uint64_t new_code)
Set the raw state of the object.
Definition: ir_Kelon.cpp:341
uint8_t _previousMode
Definition: ir_Kelon.h:138
const uint8_t kKelonFanAuto
Definition: ir_Kelon.h:63
uint8_t Fan
Definition: ir_Kelon.h:39
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint8_t Mode
Definition: ir_Kelon.h:44
uint8_t SuperCoolEnabled2
Definition: ir_Kelon.h:53
uint64_t getRaw(void) const
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
Definition: ir_Kelon.cpp:337
const int8_t kKelonDryGradeMin
Definition: ir_Kelon.h:71
void setToggleSwingVertical(const bool toggle)
Request toggling the vertical swing - will be reset to false after sending.
Definition: ir_Kelon.cpp:260
uint8_t preamble[2]
Definition: ir_Kelon.h:38
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Kelon.h:88
uint8_t TimerEnabled
Definition: ir_Kelon.h:45
const uint8_t kKelonMaxTemp
Definition: ir_Kelon.h:74
String toString(void) const
Convert the internal settings into a human readable string.
Definition: ir_Kelon.cpp:428
Class for sending all basic IR protocols.
Definition: IRsend.h:237
uint64_t raw
Definition: ir_Kelon.h:35
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
bool getToggleSwingVertical(void) const
Get whether the swing mode is set to be toggled.
Definition: ir_Kelon.cpp:266
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Kelon.cpp:156
Definition: ir_Kelon.h:77
const uint8_t kKelonFanMedium
Definition: ir_Kelon.h:68
std::string String
Definition: IRremoteESP8266.h:1521
const uint8_t kKelonModeSmart
Definition: ir_Kelon.h:59
void stateReset(void)
Reset the internals of the object to a known good state.
Definition: ir_Kelon.cpp:104
const uint8_t kKelonModeDry
Definition: ir_Kelon.h:61
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Kelon.cpp:181
void send(const uint16_t repeat=kNoRepeat)
Send the current internal state as an IR message.
Definition: ir_Kelon.cpp:114
uint8_t PowerToggle
Definition: ir_Kelon.h:40
void setTemp(const uint8_t degrees)
Set the temperature setting.
Definition: ir_Kelon.cpp:168
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed to it's stdAc::fanspeed_t equivalent.
Definition: ir_Kelon.cpp:386
const uint8_t kKelonModeCool
Definition: ir_Kelon.h:60
uint8_t TimerHours
Definition: ir_Kelon.h:48
const uint16_t kNoRepeat
Definition: IRremoteESP8266.h:1145
uint8_t pad1
Definition: ir_Kelon.h:50
uint8_t _previousFan
Definition: ir_Kelon.h:140
uint8_t DehumidifierGrade
Definition: ir_Kelon.h:42
const uint8_t kKelonModeHeat
Definition: ir_Kelon.h:58
void setDryGrade(const int8_t grade)
Set the dehumidification intensity.
Definition: ir_Kelon.cpp:198
void setSupercool(const bool on)
Control the current super cool mode setting.
Definition: ir_Kelon.cpp:278
uint16_t getTimer(void) const
Get the set timer. Timer set time is deleted once the command is sent, so calling this after send() w...
Definition: ir_Kelon.cpp:319
const uint8_t kKelonMinTemp
Definition: ir_Kelon.h:73
static uint8_t convertFan(const stdAc::fanspeed_t fan)
Convert a standard A/C fan speed (stdAc::fanspeed_t) into it a native speed.
Definition: ir_Kelon.cpp:359
IRsend _irsend
Instance of the IR send class.
Definition: ir_Kelon.h:129
IRKelonAc(uint16_t pin, bool inverted=false, bool use_modulation=true)
Class constructor.
Definition: ir_Kelon.cpp:99
uint8_t SmartModeEnabled
Definition: ir_Kelon.h:49
uint8_t TimerHalfHour
Definition: ir_Kelon.h:47
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Kelon.cpp:192
uint8_t SwingVToggle
Definition: ir_Kelon.h:43
KelonProtocol _
Definition: ir_Kelon.h:135
void setSleep(const bool on)
Control the current sleep (quiet) setting.
Definition: ir_Kelon.cpp:270
uint8_t SleepEnabled
Definition: ir_Kelon.h:41
Definition: ir_Kelon.h:34
stdAc::state_t toCommon(const stdAc::state_t *prev=nullptr) const
Convert the internal A/C object state to it's stdAc::state_t equivalent.
Definition: ir_Kelon.cpp:397
bool getTogglePower(void) const
Get whether toggling power will be requested.
Definition: ir_Kelon.cpp:164
int8_t getDryGrade(void) const
Get the current dehumidification intensity setting. In smart mode, this controls the temperature adju...
Definition: ir_Kelon.cpp:214
uint8_t Temperature
Definition: ir_Kelon.h:46
const uint8_t kKelonFanMax
Definition: ir_Kelon.h:69
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode to it's stdAc::opmode_t equivalent.
Definition: ir_Kelon.cpp:373
bool getSupercool(void) const
Is the super cool mode setting on?
Definition: ir_Kelon.cpp:293
uint8_t pad2
Definition: ir_Kelon.h:52
const uint8_t kKelonModeFan
Definition: ir_Kelon.h:62
const int8_t kKelonDryGradeMax
Definition: ir_Kelon.h:72
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition: ir_Kelon.cpp:221
uint8_t SuperCoolEnabled1
Definition: ir_Kelon.h:51
void setTimerEnabled(const bool on)
Enable or disable the timer. Note that in order to enable the timer the minutes must be set with setT...
Definition: ir_Kelon.cpp:328
const uint8_t kKelonFanMin
Definition: ir_Kelon.h:67
Structure to hold a common A/C state.
Definition: IRsend.h:114
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a standard A/C mode (stdAc::opmode_t) into it a native mode.
Definition: ir_Kelon.cpp:346
bool getTimerEnabled(void) const
Get the current timer status.
Definition: ir_Kelon.cpp:332
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Kelon.cpp:177
void setTimer(const uint16_t mins)
Set the timer time and enable it. Timer is an off timer if the unit is on, it is an on timer if the u...
Definition: ir_Kelon.cpp:299
void setTogglePower(const bool toggle)
Request toggling power - will be reset to false after sending.
Definition: ir_Kelon.cpp:160
uint8_t _previousTemp
Definition: ir_Kelon.h:139
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49