Go to the documentation of this file.
22 #define __STDC_LIMIT_MACROS
30 #include "IRsend_test.h"
116 explicit IRElectraAc(
const uint16_t pin,
const bool inverted =
false,
117 const bool use_modulation =
true);
126 #endif // SEND_ELECTRA_AC
132 void setMode(
const uint8_t mode);
134 void setTemp(
const uint8_t temp);
136 void setFan(
const uint8_t speed);
137 uint8_t
getFan(
void)
const;
155 void setRaw(
const uint8_t new_code[],
179 #endif // IR_ELECTRA_H_
uint8_t Temp
Definition: ir_Electra.h:41
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Electra.cpp:159
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Electra.cpp:166
void checksum(const uint16_t length=kElectraAcStateLength)
Calculate and set the checksum values for the internal state.
Definition: ir_Electra.cpp:95
void setSensorUpdate(const bool on)
Set the silent Sensor Update setting of the message. i.e. Is this just a sensor temp update message f...
Definition: ir_Electra.cpp:342
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Electra.cpp:110
const uint8_t kElectraAcMinTemp
Definition: ir_Electra.h:81
bool getSwingV(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_Electra.cpp:260
uint8_t Power
Definition: ir_Electra.h:69
bool getSensorUpdate(void) const
Get the silent Sensor Update setting of the message. i.e. Is this just a sensor temp update message f...
Definition: ir_Electra.cpp:334
const uint8_t kElectraAcMaxTemp
Definition: ir_Electra.h:82
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Electra.cpp:136
static bool validChecksum(const uint8_t state[], const uint16_t length=kElectraAcStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Electra.cpp:87
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Electra.cpp:361
const uint8_t kElectraAcFanAuto
Definition: ir_Electra.h:87
void on(void)
Change the power setting to On.
Definition: ir_Electra.cpp:123
uint8_t Fan
Definition: ir_Electra.h:51
void setClean(const bool on)
Set the Clean mode of the A/C.
Definition: ir_Electra.cpp:291
const uint16_t kElectraAcMinRepeat
Definition: IRremoteESP8266.h:1236
uint8_t SensorUpdate
Definition: ir_Electra.h:47
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Electra.cpp:199
Class for sending all basic IR protocols.
Definition: IRsend.h:237
IRElectraAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Electra.cpp:56
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
void setSensorTemp(const uint8_t temp)
Set the Sensor temperature for the IFeel mode.
Definition: ir_Electra.cpp:346
const uint8_t kElectraAcHeat
Definition: ir_Electra.h:95
ElectraProtocol _
Definition: ir_Electra.h:176
void setIFeel(const bool on)
Set the IFeel mode of the A/C.
Definition: ir_Electra.cpp:319
std::string String
Definition: IRremoteESP8266.h:1521
const uint8_t kElectraAcCool
Definition: ir_Electra.h:93
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Electra.cpp:206
uint8_t Sum
Definition: ir_Electra.h:76
uint8_t SensorTemp
Definition: ir_Electra.h:62
Class for handling detailed Electra A/C messages.
Definition: ir_Electra.h:114
const uint8_t kElectraAcAuto
Definition: ir_Electra.h:92
uint8_t getSensorTemp(void) const
Get the current sensor temperature setting for the IFeel mode.
Definition: ir_Electra.cpp:354
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Electra.cpp:179
const uint8_t kElectraAcDry
Definition: ir_Electra.h:94
uint8_t IFeel
Definition: ir_Electra.h:58
const uint8_t kElectraAcSensorMinTemp
Definition: ir_Electra.h:109
void setRaw(const uint8_t new_code[], const uint16_t length=kElectraAcStateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Electra.cpp:118
bool getLightToggle(void) const
Get the Light (LED) Toggle mode of the A/C.
Definition: ir_Electra.cpp:284
bool getClean(void) const
Get the Clean mode of the A/C.
Definition: ir_Electra.cpp:297
void setPower(const bool on)
Change the power setting.
Definition: ir_Electra.cpp:130
const uint8_t kElectraAcTempDelta
Definition: ir_Electra.h:83
Native representation of a Electra A/C message.
Definition: ir_Electra.h:34
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Electra.h:125
const uint8_t kElectraAcSensorMaxTemp
Definition: ir_Electra.h:110
const uint8_t kElectraAcLightToggleOff
Definition: ir_Electra.h:104
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Electra.cpp:243
uint8_t Clean
Definition: ir_Electra.h:67
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Electra.cpp:191
const uint8_t kElectraAcLightToggleOn
Definition: ir_Electra.h:98
void setLightToggle(const bool on)
Set the Light (LED) Toggle mode of the A/C.
Definition: ir_Electra.cpp:278
uint8_t Mode
Definition: ir_Electra.h:60
const uint8_t kElectraAcFanLow
Definition: ir_Electra.h:88
void setSwingH(const bool on)
Set the Horizontal Swing mode of the A/C.
Definition: ir_Electra.cpp:266
const uint8_t kElectraAcSensorTempDelta
Definition: ir_Electra.h:108
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kElectraAcStateLength)
Calculate the checksum for a given state.
Definition: ir_Electra.cpp:77
uint8_t SwingV
Definition: ir_Electra.h:40
void off(void)
Change the power setting to Off.
Definition: ir_Electra.cpp:126
void send(const uint16_t repeat=kElectraAcMinRepeat)
Send the current internal state as an IR message.
Definition: ir_Electra.cpp:103
IRsend _irsend
instance of the IR send class
Definition: ir_Electra.h:170
const uint8_t kElectraAcSwingOn
Definition: ir_Electra.h:84
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Electra.cpp:222
const uint8_t kElectraAcFanMed
Definition: ir_Electra.h:89
bool getIFeel(void) const
Get the IFeel mode of the A/C.
Definition: ir_Electra.cpp:315
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Electra.cpp:391
const uint8_t kElectraAcFanHigh
Definition: ir_Electra.h:90
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Electra.cpp:229
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Electra.cpp:71
void setTurbo(const bool on)
Set the Turbo mode of the A/C.
Definition: ir_Electra.cpp:303
uint8_t Turbo
Definition: ir_Electra.h:54
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Electra.cpp:142
bool getTurbo(void) const
Get the Turbo mode of the A/C.
Definition: ir_Electra.cpp:309
bool getSwingH(void) const
Get the Horizontal Swing mode of the A/C.
Definition: ir_Electra.cpp:272
uint8_t LightToggle
Definition: ir_Electra.h:74
const uint8_t kElectraAcFan
Definition: ir_Electra.h:96
const uint8_t kElectraAcLightToggleMask
Definition: ir_Electra.h:102
const uint8_t kElectraAcSwingOff
Definition: ir_Electra.h:85
Structure to hold a common A/C state.
Definition: IRsend.h:114
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Electra.cpp:63
uint8_t raw[kElectraAcStateLength]
The state of the IR remote.
Definition: ir_Electra.h:35
uint8_t SwingH
Definition: ir_Electra.h:44
void setSwingV(const bool on)
Set the Vertical Swing mode of the A/C.
Definition: ir_Electra.cpp:254
const uint16_t kElectraAcStateLength
Definition: IRremoteESP8266.h:1234
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49