Go to the documentation of this file.
21 #ifndef IR_WHIRLPOOL_H_
22 #define IR_WHIRLPOOL_H_
24 #define __STDC_LIMIT_MACROS
32 #include "IRsend_test.h"
93 explicit IRWhirlpoolAc(
const uint16_t pin,
const bool inverted =
false,
94 const bool use_modulation =
true);
98 const bool calcchecksum =
true);
104 #endif // SEND_WHIRLPOOL_AC
112 void setTemp(
const uint8_t temp);
114 void setFan(
const uint8_t speed);
116 void setMode(
const uint8_t mode);
123 void setClock(
const uint16_t minspastmidnight);
125 void setOnTimer(
const uint16_t minspastmidnight);
136 uint8_t*
getRaw(
const bool calcchecksum =
true);
137 void setRaw(
const uint8_t new_code[],
159 uint16_t
getTime(
const uint16_t pos);
160 void setTime(
const uint16_t pos,
const uint16_t minspastmidnight);
162 void enableTimer(
const uint16_t pos,
const bool state);
163 void _setTemp(
const uint8_t temp,
const bool remember =
true);
168 #endif // IR_WHIRLPOOL_H_
const uint8_t kWhirlpoolAcLightOffset
Definition: ir_Whirlpool.h:58
void send(const uint16_t repeat=kWhirlpoolAcDefaultRepeat, const bool calcchecksum=true)
Send the current internal state as an IR message.
Definition: ir_Whirlpool.cpp:139
const uint8_t kWhirlpoolAcOnTimerPos
Definition: ir_Whirlpool.h:72
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Whirlpool.cpp:89
uint16_t getClock(void)
Get the clock time in nr. of minutes past midnight.
Definition: ir_Whirlpool.cpp:357
const uint8_t kWhirlpoolAcCommandSuper
Definition: ir_Whirlpool.h:78
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Whirlpool.h:103
const uint8_t kWhirlpoolAcFanSize
Definition: ir_Whirlpool.h:46
uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Whirlpool.cpp:485
const uint8_t kWhirlpoolAcSuperPos
Definition: ir_Whirlpool.h:64
void _setTemp(const uint8_t temp, const bool remember=true)
Set the temperature.
Definition: ir_Whirlpool.cpp:198
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
whirlpool_ac_remote_model_t
Whirlpool A/C model numbers.
Definition: IRsend.h:158
const uint8_t kWhirlpoolAcAutoTemp
Definition: ir_Whirlpool.h:54
const uint8_t kWhirlpoolAcModePos
Definition: ir_Whirlpool.h:44
const uint8_t kWhirlpoolAcFanHigh
Definition: ir_Whirlpool.h:48
const uint8_t kWhirlpoolAcPowerTogglePos
Definition: ir_Whirlpool.h:60
const uint8_t kWhirlpoolAcMaxTemp
Definition: ir_Whirlpool.h:53
const uint8_t kWhirlpoolAcAltTempPos
Definition: ir_Whirlpool.h:87
const uint8_t kWhirlpoolAcAuto
Definition: ir_Whirlpool.h:39
const uint8_t kWhirlpoolAcFanPos
Definition: ir_Whirlpool.h:51
uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Whirlpool.cpp:498
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivilant.
Definition: ir_Whirlpool.cpp:525
bool isOnTimerEnabled(void)
Is the On timer enabled?
Definition: ir_Whirlpool.cpp:400
IRWhirlpoolAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Whirlpool.cpp:84
uint8_t getMode(void)
Get the operating mode setting of the A/C.
Definition: ir_Whirlpool.cpp:255
const uint8_t kWhirlpoolAcCommandOnTimer
Definition: ir_Whirlpool.h:79
const uint8_t kWhirlpoolAcTempPos
Definition: ir_Whirlpool.h:55
bool getLight(void)
Get the Light (Display/LED) setting of the A/C.
Definition: ir_Whirlpool.cpp:308
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Whirlpool.cpp:209
const uint8_t kWhirlpoolAcTimerEnableOffset
Definition: ir_Whirlpool.h:69
const uint8_t kWhirlpoolAcCommandIFeel
Definition: ir_Whirlpool.h:82
bool getSwing(void)
Get the (vertical) swing setting of the A/C.
Definition: ir_Whirlpool.cpp:293
const uint8_t kWhirlpoolAcModeOffset
Definition: ir_Whirlpool.h:43
void setClock(const uint16_t minspastmidnight)
Set the clock time in nr. of minutes past midnight.
Definition: ir_Whirlpool.cpp:351
Class for sending all basic IR protocols.
Definition: IRsend.h:176
const uint8_t kWhirlpoolAcSuperMask
Definition: ir_Whirlpool.h:63
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
const uint8_t kWhirlpoolAcChecksumByte1
Definition: ir_Whirlpool.h:36
bool getSleep(void)
Get the Sleep setting of the A/C.
Definition: ir_Whirlpool.cpp:444
const uint8_t kWhirlpoolAcMinuteSize
Definition: ir_Whirlpool.h:68
uint16_t getTime(const uint16_t pos)
Get the time in nr. of minutes past midnight.
Definition: ir_Whirlpool.cpp:328
void enableTimer(const uint16_t pos, const bool state)
Enable the timer enabled at the given byte offset.
Definition: ir_Whirlpool.cpp:345
Class for handling detailed Whirlpool A/C messages.
Definition: ir_Whirlpool.h:91
std::string String
Definition: IRremoteESP8266.h:1128
const uint8_t kWhirlpoolAcCommandPos
Definition: ir_Whirlpool.h:73
const uint8_t kWhirlpoolAcCommandMode
Definition: ir_Whirlpool.h:80
uint8_t getTemp(void)
Get the current temperature setting.
Definition: ir_Whirlpool.cpp:217
int8_t getTempOffset(void)
Calculate the temp. offset in deg C for the current model.
Definition: ir_Whirlpool.cpp:187
uint8_t getFan(void)
Get the current fan speed setting.
Definition: ir_Whirlpool.cpp:278
const uint8_t kWhirlpoolAcCool
Definition: ir_Whirlpool.h:40
const uint8_t kWhirlpoolAcSleepPos
Definition: ir_Whirlpool.h:62
whirlpool_ac_remote_model_t getModel(void)
Get/Detect the model of the A/C.
Definition: ir_Whirlpool.cpp:162
const uint8_t kWhirlpoolAcCommandOffTimer
Definition: ir_Whirlpool.h:85
const uint8_t kWhirlpoolAcSwing1Offset
Definition: ir_Whirlpool.h:56
const uint8_t kWhirlpoolAcCommandSwing
Definition: ir_Whirlpool.h:81
bool isOffTimerEnabled(void)
Is the Off timer enabled?
Definition: ir_Whirlpool.cpp:375
const uint8_t kWhirlpoolAcMinuteOffset
Definition: ir_Whirlpool.h:67
static bool validChecksum(const uint8_t state[], const uint16_t length=kWhirlpoolAcStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Whirlpool.cpp:104
const uint8_t kWhirlpoolAcFanMedium
Definition: ir_Whirlpool.h:49
const uint8_t kWhirlpoolAcDry
Definition: ir_Whirlpool.h:41
const uint8_t kWhirlpoolAcAltTempOffset
Definition: ir_Whirlpool.h:86
void setPowerToggle(const bool on)
Change the power toggle setting.
Definition: ir_Whirlpool.cpp:413
void setOffTimer(const uint16_t minspastmidnight)
Set the Off Timer time.
Definition: ir_Whirlpool.cpp:363
const uint8_t kWhirlpoolAcSwing2Offset
Definition: ir_Whirlpool.h:57
const uint8_t kWhirlpoolAcCommandLight
Definition: ir_Whirlpool.h:74
uint8_t getCommand(void)
Get the Command (Button) setting of the A/C.
Definition: ir_Whirlpool.cpp:429
void _setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Whirlpool.cpp:225
const uint8_t kWhirlpoolAcFanLow
Definition: ir_Whirlpool.h:50
const uint16_t kWhirlpoolAcDefaultRepeat
Definition: IRremoteESP8266.h:1040
const uint8_t kWhirlpoolAcOffTimerPos
Definition: ir_Whirlpool.h:71
uint16_t getOffTimer(void)
Get the Off Timer time..
Definition: ir_Whirlpool.cpp:369
void setModel(const whirlpool_ac_remote_model_t model)
Set the model of the A/C to emulate.
Definition: ir_Whirlpool.cpp:171
void setSuper(const bool on)
Set the Super (Turbo/Jet) setting of the A/C.
Definition: ir_Whirlpool.cpp:450
const uint8_t kWhirlpoolAcChecksumByte2
Definition: ir_Whirlpool.h:37
const uint8_t kWhirlpoolAcFan
Definition: ir_Whirlpool.h:42
uint16_t getOnTimer(void)
Get the On Timer time..
Definition: ir_Whirlpool.cpp:394
const uint8_t kWhirlpoolAcCommandFanSpeed
Definition: ir_Whirlpool.h:83
void setCommand(const uint8_t code)
Set the Command (Button) setting of the A/C.
Definition: ir_Whirlpool.cpp:478
const uint16_t kWhirlpoolAcStateLength
Definition: IRremoteESP8266.h:1038
const uint8_t kWhirlpoolAcHourOffset
Definition: ir_Whirlpool.h:65
void setRaw(const uint8_t new_code[], const uint16_t length=kWhirlpoolAcStateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Whirlpool.cpp:156
const uint8_t kWhirlpoolAcMinTemp
Definition: ir_Whirlpool.h:52
bool getSuper(void)
Get the Super (Turbo/Jet) setting of the A/C.
Definition: ir_Whirlpool.cpp:472
void setSleep(const bool on)
Set the Sleep setting of the A/C.
Definition: ir_Whirlpool.cpp:435
uint8_t remote_state[kWhirlpoolAcStateLength]
The state in IR code form.
Definition: ir_Whirlpool.h:156
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Whirlpool.cpp:248
String toString(void)
Convert the current internal state into a human readable string.
Definition: ir_Whirlpool.cpp:563
const uint8_t kWhirlpoolAcHeat
Definition: ir_Whirlpool.h:38
void checksum(const uint16_t length=kWhirlpoolAcStateLength)
Calculate & set the checksum for the current internal state of the remote.
Definition: ir_Whirlpool.cpp:125
void enableOffTimer(const bool on)
Enable the Off Timer.
Definition: ir_Whirlpool.cpp:381
const uint8_t kWhirlpoolAcCommandPower
Definition: ir_Whirlpool.h:75
void enableOnTimer(const bool on)
Enable the On Timer.
Definition: ir_Whirlpool.cpp:406
IRsend _irsend
Instance of the IR send class.
Definition: ir_Whirlpool.h:150
void setOnTimer(const uint16_t minspastmidnight)
Set the On Timer time.
Definition: ir_Whirlpool.cpp:388
uint8_t _desiredtemp
The last user explicitly set temperature.
Definition: ir_Whirlpool.h:157
bool getPowerToggle(void)
Get the value of the current power toggle setting.
Definition: ir_Whirlpool.cpp:422
const uint8_t kWhirlpoolAcCommandTemp
Definition: ir_Whirlpool.h:76
const uint8_t kWhirlpoolAcFanOffset
Definition: ir_Whirlpool.h:45
const uint8_t kWhirlpoolAcCommand6thSense
Definition: ir_Whirlpool.h:84
const uint8_t kWhirlpoolAcCommandSleep
Definition: ir_Whirlpool.h:77
const uint8_t kWhirlpoolAcClockPos
Definition: ir_Whirlpool.h:70
const uint8_t kWhirlpoolAcPowerToggleOffset
Definition: ir_Whirlpool.h:59
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Whirlpool.cpp:98
const uint8_t kWhirlpoolAcSleepOffset
Definition: ir_Whirlpool.h:61
stdAc::state_t toCommon(void)
Convert the current internal state into its stdAc::state_t equivilant.
Definition: ir_Whirlpool.cpp:536
Structure to hold a common A/C state.
Definition: IRsend.h:97
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Whirlpool.cpp:262
void setLight(const bool on)
Set the Light (Display/LED) setting of the A/C.
Definition: ir_Whirlpool.cpp:301
void setTime(const uint16_t pos, const uint16_t minspastmidnight)
Set the time in nr. of minutes past midnight.
Definition: ir_Whirlpool.cpp:315
void setSwing(const bool on)
Set the (vertical) swing setting of the A/C.
Definition: ir_Whirlpool.cpp:285
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivilant.
Definition: ir_Whirlpool.cpp:512
const uint8_t kWhirlpoolAcHourSize
Definition: ir_Whirlpool.h:66
const uint8_t kWhirlpoolAcFanAuto
Definition: ir_Whirlpool.h:47
uint8_t * getRaw(const bool calcchecksum=true)
Get a copy of the internal state/code for this protocol.
Definition: ir_Whirlpool.cpp:148
bool isTimerEnabled(const uint16_t pos)
Is the timer enabled at the given byte offset?
Definition: ir_Whirlpool.cpp:338
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46