Go to the documentation of this file.
18 #ifndef IR_KELVINATOR_H_
19 #define IR_KELVINATOR_H_
21 #define __STDC_LIMIT_MACROS
29 #include "IRsend_test.h"
47 #define KELVINATOR_MIN_TEMP kKelvinatorMinTemp
48 #define KELVINATOR_MAX_TEMP kKelvinatorMaxTemp
49 #define KELVINATOR_HEAT kKelvinatorHeat
50 #define KELVINATOR_FAN_MAX kKelvinatorFanMax
51 #define KELVINATOR_FAN_AUTO kKelvinatorFanAuto
52 #define KELVINATOR_FAN kKelvinatorFan
53 #define KELVINATOR_DRY kKelvinatorDry
54 #define KELVINATOR_COOL kKelvinatorCool
55 #define KELVINATOR_BASIC_FAN_MAX kKelvinatorBasicFanMax
56 #define KELVINATOR_AUTO_TEMP kKelvinatorAutoTemp
57 #define KELVINATOR_AUTO kKelvinatorAuto
139 explicit IRKelvinatorAC(
const uint16_t pin,
const bool inverted =
false,
140 const bool use_modulation =
true);
149 #endif // SEND_KELVINATOR
155 void setTemp(
const uint8_t degrees);
157 void setFan(
const uint8_t speed);
159 void setMode(
const uint8_t mode);
176 void setRaw(
const uint8_t new_code[]);
200 #endif // IR_KELVINATOR_H_
void setSwingHorizontal(const bool on)
Control the current horizontal swing setting.
Definition: ir_Kelvinator.cpp:314
void stateReset(void)
Reset the internals of the object to a known good state.
Definition: ir_Kelvinator.cpp:129
void checksum(const uint16_t length=kKelvinatorStateLength)
Calculate the checksum for the internal state.
Definition: ir_Kelvinator.cpp:188
bool getTurbo(void)
Is the Turbo setting on?
Definition: ir_Kelvinator.cpp:392
void setTurbo(const bool on)
Control the current Turbo setting.
Definition: ir_Kelvinator.cpp:385
bool getSwingVertical(void)
Is the vertical swing setting on?
Definition: ir_Kelvinator.cpp:308
const uint8_t kKelvinatorFanAuto
Definition: ir_Kelvinator.h:39
void on(void)
Set the internal state to have the power on.
Definition: ir_Kelvinator.cpp:212
const uint8_t kKelvinatorFanMax
Definition: ir_Kelvinator.h:41
const uint8_t kKelvinatorCool
Definition: ir_Kelvinator.h:34
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
void setLight(const bool on)
Control the current Light setting. i.e. The LED display on the A/C unit that shows the basic settings...
Definition: ir_Kelvinator.cpp:355
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed to it's stdAc::fanspeed_t equivalent.
Definition: ir_Kelvinator.cpp:425
const uint8_t kKelvinatorAutoTemp
Definition: ir_Kelvinator.h:44
uint8_t * getRaw(void)
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
Definition: ir_Kelvinator.cpp:158
void setIonFilter(const bool on)
Control the current Ion Filter setting.
Definition: ir_Kelvinator.cpp:341
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Kelvinator.cpp:248
Class for sending all basic IR protocols.
Definition: IRsend.h:176
const uint8_t kKelvinatorMinTemp
Definition: ir_Kelvinator.h:42
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Kelvinator.h:148
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
std::string String
Definition: IRremoteESP8266.h:1128
void setPower(const bool on)
Set the internal state to have the desired power.
Definition: ir_Kelvinator.cpp:219
uint8_t getFan(void)
Get the current fan speed setting.
Definition: ir_Kelvinator.cpp:266
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition: ir_Kelvinator.cpp:278
void send(const uint16_t repeat=kKelvinatorDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Kelvinator.cpp:149
void setRaw(const uint8_t new_code[])
Set the raw state of the object.
Definition: ir_Kelvinator.cpp:165
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Kelvinator.cpp:136
uint8_t getMode(void)
Get the current operation mode setting.
Definition: ir_Kelvinator.cpp:272
static uint8_t calcBlockChecksum(const uint8_t *block, const uint16_t length=kKelvinatorStateLength/2)
Calculate the checksum for a given block of state.
Definition: ir_Kelvinator.cpp:174
IRsend _irsend
Instance of the IR send class.
Definition: ir_Kelvinator.h:189
bool getPower(void)
Get the power setting from the internal state.
Definition: ir_Kelvinator.cpp:226
static bool validChecksum(const uint8_t state[], const uint16_t length=kKelvinatorStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Kelvinator.cpp:200
Class for handling detailed Kelvinator A/C messages.
Definition: ir_Kelvinator.h:137
const uint8_t kKelvinatorMaxTemp
Definition: ir_Kelvinator.h:43
void fixup(void)
Fix up any odd conditions for the current state.
Definition: ir_Kelvinator.cpp:139
uint8_t getTemp(void)
Get the current temperature setting.
Definition: ir_Kelvinator.cpp:241
const uint16_t kKelvinatorStateLength
Definition: IRremoteESP8266.h:935
stdAc::state_t toCommon(void)
Convert the internal A/C object state to it's stdAc::state_t equivalent.
Definition: ir_Kelvinator.cpp:431
void setQuiet(const bool on)
Control the current Quiet setting.
Definition: ir_Kelvinator.cpp:329
void setXFan(const bool on)
Control the current XFan setting. This setting will cause the unit blow air after power off to dry ou...
Definition: ir_Kelvinator.cpp:371
const uint8_t kKelvinatorFan
Definition: ir_Kelvinator.h:36
void setTemp(const uint8_t degrees)
Set the temperature setting.
Definition: ir_Kelvinator.cpp:232
const uint8_t kKelvinatorBasicFanMax
Definition: ir_Kelvinator.h:38
const uint8_t kKelvinatorFanMin
Definition: ir_Kelvinator.h:40
bool getLight(void)
Is the Light (Display) setting on?
Definition: ir_Kelvinator.cpp:362
const uint8_t kKelvinatorHeat
Definition: ir_Kelvinator.h:37
IRKelvinatorAC(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Kelvinator.cpp:124
void off(void)
Set the internal state to have the power off.
Definition: ir_Kelvinator.cpp:215
const uint16_t kKelvinatorDefaultRepeat
Definition: IRremoteESP8266.h:937
uint8_t remote_state[kKelvinatorStateLength]
The state in IR code form.
Definition: ir_Kelvinator.h:195
void setSwingVertical(const bool on)
Control the current vertical swing setting.
Definition: ir_Kelvinator.cpp:299
const uint8_t kKelvinatorDry
Definition: ir_Kelvinator.h:35
bool getIonFilter(void)
Is the Ion Filter setting on?
Definition: ir_Kelvinator.cpp:348
String toString(void)
Convert the internal settings into a human readable string.
Definition: ir_Kelvinator.cpp:459
bool getXFan(void)
Is the XFan setting on?
Definition: ir_Kelvinator.cpp:378
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode to it's stdAc::opmode_t equivalent.
Definition: ir_Kelvinator.cpp:412
bool getQuiet(void)
Is the Quiet setting on?
Definition: ir_Kelvinator.cpp:335
Structure to hold a common A/C state.
Definition: IRsend.h:97
bool getSwingHorizontal(void)
Is the horizontal swing setting on?
Definition: ir_Kelvinator.cpp:323
const uint8_t kKelvinatorAuto
Definition: ir_Kelvinator.h:33
uint8_t convertMode(const stdAc::opmode_t mode)
Convert a standard A/C mode (stdAc::opmode_t) into it a native mode.
Definition: ir_Kelvinator.cpp:399
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46