Go to the documentation of this file.
18 #define __STDC_LIMIT_MACROS
26 #include "IRsend_test.h"
198 explicit IRMirageAc(
const uint16_t pin,
const bool inverted =
false,
199 const bool use_modulation =
true);
208 #endif // SEND_MIRAGE
214 void setTemp(
const uint8_t degrees);
216 void setFan(
const uint8_t speed);
217 uint8_t
getFan(
void)
const;
218 void setMode(
const uint8_t mode);
221 void setRaw(
const uint8_t* data);
223 void setClock(
const uint32_t nr_of_seconds);
277 #endif // IR_MIRAGE_H_
void setIFeel(const bool on)
Set the IFeel setting of the A/C.
Definition: ir_Mirage.cpp:526
uint8_t LightToggle_Kkg29ac1
Definition: ir_Mirage.h:124
bool getCleanToggle(void) const
Get the Clean Toggle setting of the A/C.
Definition: ir_Mirage.cpp:496
void setTemp(const uint8_t degrees)
Set the temperature.
Definition: ir_Mirage.cpp:286
bool getLight(void) const
Get the value of the current Light/Display setting.
Definition: ir_Mirage.cpp:365
uint8_t Sleep_Kkg9ac1
Definition: ir_Mirage.h:85
uint8_t IFeel
Definition: ir_Mirage.h:138
mirage_ac_remote_model_t _model
Definition: ir_Mirage.h:274
uint8_t Power
Definition: ir_Mirage.h:126
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Mirage.cpp:735
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:74
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Mirage.cpp:304
void setCleanToggle(const bool on)
Set the CleanToggle setting of the A/C.
Definition: ir_Mirage.cpp:484
const uint8_t kMirageAcSwingVMiddle
Definition: ir_Mirage.h:187
uint8_t Quiet
Definition: ir_Mirage.h:113
void setSleep(const bool on)
Change the Sleep setting.
Definition: ir_Mirage.cpp:330
uint16_t getOffTimer(void) const
Get the number of minutes the Off Timer is currently set for.
Definition: ir_Mirage.cpp:603
@ KKG9AC1
Definition: IRsend.h:176
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
const uint8_t kMirageAcSwingVHighest
Definition: ir_Mirage.h:189
const uint8_t kMirageAcFanHigh
Definition: ir_Mirage.h:169
uint8_t RecycleHeat
Definition: ir_Mirage.h:133
bool getQuiet(void) const
Get the Quiet setting of the A/C.
Definition: ir_Mirage.cpp:475
uint8_t SwingH
Definition: ir_Mirage.h:122
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Mirage.cpp:298
const uint8_t kMirageAcSwingVLowest
Definition: ir_Mirage.h:185
uint8_t OnTimerEnable
Definition: ir_Mirage.h:118
const uint16_t kMirageStateLength
Definition: IRremoteESP8266.h:1307
Mirage120Protocol _
Definition: ir_Mirage.h:273
uint8_t OnTimerMins
Definition: ir_Mirage.h:144
uint8_t Sleep_Kkg29ac1
Definition: ir_Mirage.h:131
uint8_t Sum
Definition: ir_Mirage.h:65
void setTurbo(const bool on)
Change the Turbo setting.
Definition: ir_Mirage.cpp:308
uint8_t SensorTemp
Definition: ir_Mirage.h:136
const uint16_t kMirageMinRepeat
Definition: IRremoteESP8266.h:1309
IRMirageAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Mirage.cpp:102
uint8_t Minutes
Definition: ir_Mirage.h:99
uint8_t Seconds
Definition: ir_Mirage.h:97
const uint8_t kMirageAcSwingVOff
Definition: ir_Mirage.h:184
void setQuiet(const bool on)
Set the Quiet setting of the A/C.
Definition: ir_Mirage.cpp:463
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Mirage.cpp:706
void checksum(void)
Calculate and set the checksum values for the internal state.
Definition: ir_Mirage.cpp:203
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Mirage.cpp:253
uint8_t raw[kMirageStateLength]
The state in code form.
Definition: ir_Mirage.h:32
uint16_t getOnTimer(void) const
Get the number of minutes the On Timer is currently set for.
Definition: ir_Mirage.cpp:577
Class for sending all basic IR protocols.
Definition: IRsend.h:237
const uint8_t kMirageAcPowerOff
Definition: ir_Mirage.h:183
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Mirage.cpp:223
std::string String
Definition: IRremoteESP8266.h:1521
bool getTurbo(void) const
Get the value of the current Turbo setting.
Definition: ir_Mirage.cpp:321
uint8_t Turbo_Kkg29ac1
Definition: ir_Mirage.h:142
const uint8_t kMirageAcSensorTempOffset
Definition: ir_Mirage.h:180
const uint8_t kMirageAcFan
Definition: ir_Mirage.h:166
void setLight(const bool on)
Change the Light/Display setting.
Definition: ir_Mirage.cpp:352
void setSensorTemp(const uint8_t degrees)
Set the Sensor Temp setting of the A/C's remote.
Definition: ir_Mirage.cpp:553
const uint8_t kMirageAcKKG29AC1FanAuto
Definition: ir_Mirage.h:172
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Mirage.cpp:138
Class for handling detailed Mirage 120-bit A/C messages.
Definition: ir_Mirage.h:196
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_Mirage.cpp:721
uint8_t Hours
Definition: ir_Mirage.h:101
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Mirage.h:207
bool getSwingH(void) const
Get the Horizontal Swing setting of the A/C.
Definition: ir_Mirage.cpp:454
uint8_t OffTimerEnable
Definition: ir_Mirage.h:117
uint8_t SwingV
Definition: ir_Mirage.h:123
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Mirage.cpp:220
const uint8_t kMirageAcDry
Definition: ir_Mirage.h:164
const uint8_t kMirageAcSwingVAuto
Definition: ir_Mirage.h:190
uint8_t OffTimerMins
Definition: ir_Mirage.h:150
static uint8_t convertFan(const stdAc::fanspeed_t speed, const mirage_ac_remote_model_t model=mirage_ac_remote_model_t::KKG9AC1)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Mirage.cpp:680
void fromCommon(const stdAc::state_t state)
Convert & set a stdAc::state_t to its equivalent internal settings.
Definition: ir_Mirage.cpp:763
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Mirage.cpp:107
const uint8_t kMirageAcSwingVHigh
Definition: ir_Mirage.h:188
uint8_t Filter
Definition: ir_Mirage.h:129
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Mirage.cpp:294
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed, const mirage_ac_remote_model_t model=mirage_ac_remote_model_t::KKG9AC1)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Mirage.cpp:643
void setModel(const mirage_ac_remote_model_t model)
Set the model code of the interal message state.
Definition: ir_Mirage.cpp:183
bool getIFeel(void) const
Get the IFeel setting of the A/C.
Definition: ir_Mirage.cpp:544
mirage_ac_remote_model_t getModel(const bool useRaw=false) const
Get the model code of the interal message state.
Definition: ir_Mirage.cpp:177
uint16_t getSensorTemp(void) const
Get the Sensor Temp setting of the A/C's remote.
Definition: ir_Mirage.cpp:566
const uint8_t kMirageAcSensorTempMax
Definition: ir_Mirage.h:181
uint8_t OnTimerHours
Definition: ir_Mirage.h:140
uint8_t Light_Kkg9ac1
Definition: ir_Mirage.h:76
uint8_t Fan
Definition: ir_Mirage.h:43
const uint8_t kMirageAcKKG29AC1FanLow
Definition: ir_Mirage.h:174
static bool validChecksum(const uint8_t *data)
Verify the checksum is valid for a given state.
Definition: ir_Mirage.cpp:208
const uint8_t kMirageAcMaxTemp
Definition: ir_Mirage.h:178
static uint8_t calculateChecksum(const uint8_t *data)
Calculate the checksum for a given state.
Definition: ir_Mirage.cpp:215
uint8_t Mode
Definition: ir_Mirage.h:45
const uint8_t kMirageAcKKG29AC1FanMed
Definition: ir_Mirage.h:175
void setSwingH(const bool on)
Set the Horizontal Swing setting of the A/C.
Definition: ir_Mirage.cpp:442
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Mirage.cpp:667
const uint8_t kMirageAcHeat
Definition: ir_Mirage.h:162
void setClock(const uint32_t nr_of_seconds)
Set the clock time on the A/C unit.
Definition: ir_Mirage.cpp:386
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_Mirage.cpp:792
const uint8_t kMirageAcSwingVLow
Definition: ir_Mirage.h:186
const uint8_t kMirageAcMinTemp
Definition: ir_Mirage.h:177
const uint8_t kMirageAcCool
Definition: ir_Mirage.h:163
bool getSleep(void) const
Get the value of the current Sleep setting.
Definition: ir_Mirage.cpp:342
const uint8_t kMirageAcFanAuto
Definition: ir_Mirage.h:168
Native representation of a Mirage 120-bit A/C message.
Definition: ir_Mirage.h:31
bool getFilter(void) const
Get the Filter setting of the A/C.
Definition: ir_Mirage.cpp:517
mirage_ac_remote_model_t
MIRAGE A/C model numbers.
Definition: IRsend.h:175
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Mirage.cpp:630
const uint8_t kMirageAcKKG29AC1FanHigh
Definition: ir_Mirage.h:173
uint8_t CleanToggle
Definition: ir_Mirage.h:137
void setOnTimer(const uint16_t nr_of_mins)
Set the number of minutes for the On Timer.
Definition: ir_Mirage.cpp:588
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Mirage.cpp:268
const uint8_t kMirageAcFanLow
Definition: ir_Mirage.h:171
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Mirage.cpp:117
void setSwingV(const uint8_t position)
Set the Vertical Swing setting/position of the A/C.
Definition: ir_Mirage.cpp:404
uint32_t getClock(void) const
Get the clock time of the A/C unit.
Definition: ir_Mirage.cpp:374
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_Mirage.cpp:145
IRsend _irsend
Instance of the IR send class.
Definition: ir_Mirage.h:267
const uint8_t kMirageAcTempOffset
Definition: ir_Mirage.h:179
const uint8_t kMirageAcFanMed
Definition: ir_Mirage.h:170
uint8_t getSwingV(void) const
Get the Vertical Swing setting/position of the A/C.
Definition: ir_Mirage.cpp:431
void send(const uint16_t repeat=kMirageMinRepeat)
Send the current internal state as an IR message.
Definition: ir_Mirage.cpp:122
uint8_t Temp
Definition: ir_Mirage.h:37
Structure to hold a common A/C state.
Definition: IRsend.h:114
uint8_t Header
Definition: ir_Mirage.h:35
uint8_t OffTimerHours
Definition: ir_Mirage.h:147
const uint8_t kMirageAcRecycle
Definition: ir_Mirage.h:165
void setFilter(const bool on)
Set the Filter setting of the A/C.
Definition: ir_Mirage.cpp:505
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Mirage.cpp:264
void setOffTimer(const uint16_t nr_of_mins)
Set the number of minutes for the Off Timer.
Definition: ir_Mirage.cpp:614
void setPower(const bool on)
Change the power setting.
Definition: ir_Mirage.cpp:227
uint8_t SwingAndPower
Definition: ir_Mirage.h:82
uint8_t Turbo_Kkg9ac1
Definition: ir_Mirage.h:88
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49