Go to the documentation of this file.
11 #ifndef IR_DELONGHI_H_
12 #define IR_DELONGHI_H_
14 #define __STDC_LIMIT_MACROS
22 #include "IRsend_test.h"
75 explicit IRDelonghiAc(
const uint16_t pin,
const bool inverted =
false,
76 const bool use_modulation =
true);
85 #endif // SEND_DELONGHI_AC
95 void setTemp(
const uint8_t temp,
const bool fahrenheit =
false,
96 const bool force =
false);
98 void setFan(
const uint8_t speed);
99 uint8_t
getFan(
void)
const;
100 void setMode(
const uint8_t mode);
115 void setRaw(
const uint64_t state);
136 #endif // IR_DELONGHI_H_
uint8_t OnTimer
Definition: ir_Delonghi.h:38
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Delonghi.cpp:270
uint8_t OnMins
Definition: ir_Delonghi.h:41
const uint8_t kDelonghiAcCool
Definition: ir_Delonghi.h:63
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Delonghi.cpp:217
void send(const uint16_t repeat=kDelonghiAcDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Delonghi.cpp:103
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Delonghi.cpp:330
void setRaw(const uint64_t state)
Set the internal state from a valid code for this protocol.
Definition: ir_Delonghi.cpp:150
uint8_t Mode
Definition: ir_Delonghi.h:34
const uint8_t kDelonghiAcTempFanMode
Definition: ir_Delonghi.h:58
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Delonghi.cpp:449
uint8_t Temp
Definition: ir_Delonghi.h:30
void on(void)
Change the power setting to On.
Definition: ir_Delonghi.cpp:153
Class for handling detailed Delonghi A/C messages.
Definition: ir_Delonghi.h:73
IRDelonghiAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Delonghi.cpp:93
const uint8_t kDelonghiAcTempMinC
Definition: ir_Delonghi.h:53
const uint8_t kDelonghiAcFanHigh
Definition: ir_Delonghi.h:60
void setOnTimer(const uint16_t nr_of_mins)
Set the On timer to activate in nr of minutes.
Definition: ir_Delonghi.cpp:378
void setPower(const bool on)
Change the power setting.
Definition: ir_Delonghi.cpp:160
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint8_t _saved_temp
The previously user requested temp value.
Definition: ir_Delonghi.h:132
void setOffTimerEnabled(const bool on)
Set the enable status of the Off Timer.
Definition: ir_Delonghi.cpp:394
const uint8_t kDelonghiAcFanMedium
Definition: ir_Delonghi.h:61
const uint8_t kDelonghiAcTempAutoDryMode
Definition: ir_Delonghi.h:57
bool getOffTimerEnabled(void) const
Get the enable status of the Off Timer.
Definition: ir_Delonghi.cpp:400
const uint8_t kDelonghiAcFanLow
Definition: ir_Delonghi.h:62
uint8_t OffTimer
Definition: ir_Delonghi.h:43
static bool validChecksum(const uint64_t state)
Verify the checksum is valid for a given state.
Definition: ir_Delonghi.cpp:123
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Delonghi.cpp:314
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Delonghi.h:84
DelonghiProtocol _
Definition: ir_Delonghi.h:131
Class for sending all basic IR protocols.
Definition: IRsend.h:237
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
uint8_t OnHours
Definition: ir_Delonghi.h:39
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Delonghi.cpp:98
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Delonghi.cpp:166
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Delonghi.cpp:252
std::string String
Definition: IRremoteESP8266.h:1521
bool getTempUnit(void) const
Get the temperature scale unit of measure currently in use.
Definition: ir_Delonghi.cpp:178
uint8_t Power
Definition: ir_Delonghi.h:33
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Delonghi.cpp:281
uint16_t getOnTimer(void) const
Get the On timer time.
Definition: ir_Delonghi.cpp:388
uint16_t getOffTimer(void) const
Get the Off timer time.
Definition: ir_Delonghi.cpp:417
const uint8_t kDelonghiAcFanAuto
Definition: ir_Delonghi.h:59
const uint8_t kDelonghiAcChecksumOffset
Definition: ir_Delonghi.h:68
void setOnTimerEnabled(const bool on)
Set the enable status of the On Timer.
Definition: ir_Delonghi.cpp:365
const uint8_t kDelonghiAcTempMaxF
Definition: ir_Delonghi.h:56
const uint8_t kDelonghiAcAuto
Definition: ir_Delonghi.h:66
bool getSleep(void) const
Get the Sleep mode status of the A/C.
Definition: ir_Delonghi.cpp:359
uint8_t Fahrenheit
Definition: ir_Delonghi.h:32
uint8_t Boost
Definition: ir_Delonghi.h:35
bool getBoost(void) const
Get the Boost (Turbo) mode of the A/C.
Definition: ir_Delonghi.cpp:347
void checksum(void)
Calculate and set the checksum values for the internal state.
Definition: ir_Delonghi.cpp:130
void setSleep(const bool on)
Set the Sleep mode of the A/C.
Definition: ir_Delonghi.cpp:353
const uint16_t kDelonghiAcDefaultRepeat
Definition: IRremoteESP8266.h:1221
uint8_t _saved_temp_units
The previously user requested temp units.
Definition: ir_Delonghi.h:133
const uint16_t kDelonghiAcTimerMax
Definition: ir_Delonghi.h:67
uint8_t Fan
Definition: ir_Delonghi.h:31
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Delonghi.cpp:287
bool getOnTimerEnabled(void) const
Get the enable status of the On Timer.
Definition: ir_Delonghi.cpp:371
void setTemp(const uint8_t temp, const bool fahrenheit=false, const bool force=false)
Set the temperature.
Definition: ir_Delonghi.cpp:186
void setOffTimer(const uint16_t nr_of_mins)
Set the Off timer to activate in nr of minutes.
Definition: ir_Delonghi.cpp:407
uint64_t getRaw(void)
Get a copy of the internal state as a valid code for this protocol.
Definition: ir_Delonghi.cpp:143
static uint8_t calcChecksum(const uint64_t state)
Calculate the checksum for a given state.
Definition: ir_Delonghi.cpp:111
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Delonghi.cpp:210
IRsend _irsend
instance of the IR send class
Definition: ir_Delonghi.h:125
void setTempUnit(const bool celsius)
Change the temperature scale units.
Definition: ir_Delonghi.cpp:172
uint8_t getFan(void) const
Get the current native fan speed setting.
Definition: ir_Delonghi.cpp:245
uint8_t OffHours
Definition: ir_Delonghi.h:44
const uint8_t kDelonghiAcDry
Definition: ir_Delonghi.h:64
uint8_t OffMins
Definition: ir_Delonghi.h:46
const uint8_t kDelonghiAcFan
Definition: ir_Delonghi.h:65
uint8_t Sum
Definition: ir_Delonghi.h:48
uint8_t Sleep
Definition: ir_Delonghi.h:36
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Delonghi.cpp:135
uint64_t raw
The state of the IR remote.
Definition: ir_Delonghi.h:27
Native representation of a Delonghi A/C message.
Definition: ir_Delonghi.h:26
void setBoost(const bool on)
Set the Boost (Turbo) mode of the A/C.
Definition: ir_Delonghi.cpp:341
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Delonghi.cpp:423
Structure to hold a common A/C state.
Definition: IRsend.h:114
const uint8_t kDelonghiAcTempMinF
Definition: ir_Delonghi.h:55
void off(void)
Change the power setting to Off.
Definition: ir_Delonghi.cpp:156
const uint8_t kDelonghiAcTempMaxC
Definition: ir_Delonghi.h:54
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49