Go to the documentation of this file.
20 #ifndef IR_MITSUBISHIHEAVY_H_
21 #define IR_MITSUBISHIHEAVY_H_
29 #include "IRsend_test.h"
82 0xAD, 0x51, 0x3C, 0xE5, 0x1A};
149 0xAD, 0x51, 0x3C, 0xD9, 0x26};
187 const bool inverted =
false,
188 const bool use_modulation =
true);
190 #if SEND_MITSUBISHIHEAVY
197 #endif // SEND_MITSUBISHIHEAVY
205 void setTemp(
const uint8_t temp);
208 void setFan(
const uint8_t fan);
209 uint8_t
getFan(
void)
const;
211 void setMode(
const uint8_t mode);
223 bool get3D(
void)
const;
241 void setRaw(
const uint8_t* data);
245 const uint8_t *state,
274 const bool inverted =
false,
275 const bool use_modulation =
true);
277 #if SEND_MITSUBISHIHEAVY
284 #endif // SEND_MITSUBISHIHEAVY
292 void setTemp(
const uint8_t temp);
295 void setFan(
const uint8_t fan);
296 uint8_t
getFan(
void)
const;
298 void setMode(
const uint8_t mode);
313 bool get3D(
void)
const;
319 void setRaw(
const uint8_t* data);
323 const uint8_t *state,
346 #endif // IR_MITSUBISHIHEAVY_H_
bool getClean(void) const
Get the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:773
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_MitsubishiHeavy.cpp:632
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_MitsubishiHeavy.cpp:647
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_MitsubishiHeavy.cpp:601
const uint8_t kMitsubishiHeavy88SwingVByte5Size
Definition: ir_MitsubishiHeavy.h:169
uint8_t Fan
Definition: ir_MitsubishiHeavy.h:137
const uint16_t kMitsubishiHeavy152StateLength
Definition: IRremoteESP8266.h:1326
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_MitsubishiHeavy.h:196
Class for handling detailed Mitsubishi Heavy 152-bit A/C messages.
Definition: ir_MitsubishiHeavy.h:184
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_MitsubishiHeavy.cpp:578
void checksum(void)
Calculate the checksum for the current internal state of the remote. Note: Technically it has no chec...
Definition: ir_MitsubishiHeavy.cpp:321
const uint8_t kMitsubishiHeavy152SwingVHigh
Definition: ir_MitsubishiHeavy.h:103
uint8_t Mode
Definition: ir_MitsubishiHeavy.h:39
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_MitsubishiHeavy.cpp:482
uint8_t Filter
Definition: ir_MitsubishiHeavy.h:43
static uint8_t convertSwingH(const stdAc::swingh_t position)
Convert a stdAc::swingh_t enum into it's native setting.
Definition: ir_MitsubishiHeavy.cpp:385
const uint8_t kMitsubishiHeavy152SwingHRightLeft
Definition: ir_MitsubishiHeavy.h:115
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_MitsubishiHeavy.cpp:342
uint8_t D
Definition: ir_MitsubishiHeavy.h:61
bool getNight(void) const
Get the Night (Sleep) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:226
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_MitsubishiHeavy.cpp:858
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_MitsubishiHeavy.cpp:611
void setPower(const bool on)
Change the power setting.
Definition: ir_MitsubishiHeavy.cpp:125
void set3D(const bool on)
Set the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:752
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:74
const uint8_t kMitsubishiHeavy152FanMed
Definition: ir_MitsubishiHeavy.h:95
void setSwingHorizontal(const uint8_t pos)
Set the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:698
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_MitsubishiHeavy.cpp:146
uint8_t Clean
Definition: ir_MitsubishiHeavy.h:130
IRsend _irsend
Instance of the IR send class.
Definition: ir_MitsubishiHeavy.h:260
const uint8_t kMitsubishiHeavy152FanAuto
Definition: ir_MitsubishiHeavy.h:93
IRMitsubishiHeavy152Ac(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_MitsubishiHeavy.cpp:79
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint8_t SwingH
Definition: ir_MitsubishiHeavy.h:66
const uint8_t kMitsubishiHeavy152SwingVAuto
Definition: ir_MitsubishiHeavy.h:101
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:653
const uint8_t kMitsubishiHeavy88FanTurbo
Definition: ir_MitsubishiHeavy.h:167
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_MitsubishiHeavy.cpp:813
uint8_t Silent
Definition: ir_MitsubishiHeavy.h:73
const uint8_t kMitsubishiHeavy88SwingHLeftMax
Definition: ir_MitsubishiHeavy.h:154
const uint8_t kMitsubishiHeavy152SwingVHighest
Definition: ir_MitsubishiHeavy.h:102
const uint8_t kMitsubishiHeavy88SwingH3D
Definition: ir_MitsubishiHeavy.h:161
const uint8_t kMitsubishiHeavy88SwingHLeft
Definition: ir_MitsubishiHeavy.h:155
Mitsubishi88Protocol _
Definition: ir_MitsubishiHeavy.h:343
const uint8_t kMitsubishiHeavy152SwingVLow
Definition: ir_MitsubishiHeavy.h:105
const uint8_t kMitsubishiHeavy152SwingHOff
Definition: ir_MitsubishiHeavy.h:117
uint8_t getSwingHorizontal(void) const
Get the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:214
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_MitsubishiHeavy.cpp:97
const uint8_t kMitsubishiHeavy152SwingHLeftRight
Definition: ir_MitsubishiHeavy.h:116
void checksum(void)
Calculate the checksum for the current internal state of the remote. Note: Technically it has no chec...
Definition: ir_MitsubishiHeavy.cpp:788
const uint8_t kMitsubishiHeavy88SwingHMiddle
Definition: ir_MitsubishiHeavy.h:156
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_MitsubishiHeavy.cpp:413
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_MitsubishiHeavy.cpp:598
uint8_t Sig[5]
Definition: ir_MitsubishiHeavy.h:37
const uint8_t kMitsubishiHeavy88SwingVAuto
Definition: ir_MitsubishiHeavy.h:173
bool getClean(void) const
Get the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:278
void setClean(const bool on)
Set the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:767
void setSilent(const bool on)
Set the Silent (Quiet) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:247
bool getTurbo(void) const
Get the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:292
bool getTurbo(void) const
Get the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:732
Class for sending all basic IR protocols.
Definition: IRsend.h:237
const uint8_t kMitsubishiHeavy88FanEcono
Definition: ir_MitsubishiHeavy.h:168
void setSwingVertical(const uint8_t pos)
Set the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:675
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 kMitsubishiHeavy88SwingHSize
Definition: ir_MitsubishiHeavy.h:151
void setClean(const bool on)
Set the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:271
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_MitsubishiHeavy.cpp:137
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_MitsubishiHeavy.cpp:118
std::string String
Definition: IRremoteESP8266.h:1521
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_MitsubishiHeavy.cpp:85
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_MitsubishiHeavy.cpp:828
void setNight(const bool on)
Set the Night (Sleep) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:220
uint8_t Night
Definition: ir_MitsubishiHeavy.h:72
IRsend _irsend
Instance of the IR send class.
Definition: ir_MitsubishiHeavy.h:337
const uint8_t kMitsubishiHeavySigLength
Definition: ir_MitsubishiHeavy.h:78
uint8_t SwingV5
Definition: ir_MitsubishiHeavy.h:127
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_MitsubishiHeavy.cpp:121
void setSwingVertical(const uint8_t pos)
Set the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:196
const uint8_t kMitsubishiHeavy88SwingHRightLeft
Definition: ir_MitsubishiHeavy.h:159
const uint8_t kMitsubishiHeavy152SwingHRight
Definition: ir_MitsubishiHeavy.h:113
const uint8_t kMitsubishiHeavyHeat
Definition: ir_MitsubishiHeavy.h:88
void setTurbo(const bool on)
Set the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:724
swingh_t
Common A/C settings for Horizontal Swing.
Definition: IRsend.h:100
const uint8_t kMitsubishiHeavy152SwingHLeftMax
Definition: ir_MitsubishiHeavy.h:110
uint8_t SwingH1
Definition: ir_MitsubishiHeavy.h:128
const uint8_t kMitsubishiHeavyZmsSig[kMitsubishiHeavySigLength]
Definition: ir_MitsubishiHeavy.h:81
bool getEcono(void) const
Get the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:306
bool get3D(void) const
Get the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:241
const uint16_t kMitsubishiHeavy152MinRepeat
Definition: IRremoteESP8266.h:1328
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_MitsubishiHeavy.h:283
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_MitsubishiHeavy.cpp:168
uint8_t Temp
Definition: ir_MitsubishiHeavy.h:48
static bool checkZjsSig(const uint8_t *state)
Verify the given state has a ZJ-S signature.
Definition: ir_MitsubishiHeavy.cpp:780
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_MitsubishiHeavy.cpp:617
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_MitsubishiHeavy.cpp:131
IRMitsubishiHeavy88Ac(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_MitsubishiHeavy.cpp:560
uint8_t Sig[5]
Definition: ir_MitsubishiHeavy.h:124
const uint8_t kMitsubishiHeavyMaxTemp
Definition: ir_MitsubishiHeavy.h:91
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:593
const uint16_t kMitsubishiHeavy88StateLength
Definition: IRremoteESP8266.h:1323
const uint8_t kMitsubishiHeavy88SwingVMiddle
Definition: ir_MitsubishiHeavy.h:176
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_MitsubishiHeavy.cpp:355
const uint8_t kMitsubishiHeavyZjsSig[kMitsubishiHeavySigLength]
Definition: ir_MitsubishiHeavy.h:148
const uint8_t kMitsubishiHeavy152FanLow
Definition: ir_MitsubishiHeavy.h:94
const uint8_t kMitsubishiHeavy88FanHigh
Definition: ir_MitsubishiHeavy.h:166
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_MitsubishiHeavy.cpp:400
uint8_t Three
Definition: ir_MitsubishiHeavy.h:59
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:106
const uint8_t kMitsubishiHeavyMinTemp
Definition: ir_MitsubishiHeavy.h:90
uint8_t Power
Definition: ir_MitsubishiHeavy.h:40
const uint8_t kMitsubishiHeavyCool
Definition: ir_MitsubishiHeavy.h:85
void setEcono(const bool on)
Set the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:298
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:586
const uint8_t kMitsubishiHeavy88FanLow
Definition: ir_MitsubishiHeavy.h:164
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_MitsubishiHeavy.cpp:626
uint8_t raw[kMitsubishiHeavy88StateLength]
State in code form.
Definition: ir_MitsubishiHeavy.h:121
const uint8_t kMitsubishiHeavy88SwingVLow
Definition: ir_MitsubishiHeavy.h:177
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_MitsubishiHeavy.cpp:190
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_MitsubishiHeavy.cpp:669
static bool checkZmsSig(const uint8_t *state)
Verify the given state has a ZM-S signature.
Definition: ir_MitsubishiHeavy.cpp:313
const uint8_t kMitsubishiHeavy152SwingVMiddle
Definition: ir_MitsubishiHeavy.h:104
const uint8_t kMitsubishiHeavy88SwingHRight
Definition: ir_MitsubishiHeavy.h:157
const uint8_t kMitsubishiHeavy88SwingVHighest
Definition: ir_MitsubishiHeavy.h:174
uint8_t Mode
Definition: ir_MitsubishiHeavy.h:141
uint8_t getSwingHorizontal(void) const
Get the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:718
const uint8_t kMitsubishiHeavy88SwingVOff
Definition: ir_MitsubishiHeavy.h:172
uint8_t getSwingVertical(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:202
void setEcono(const bool on)
Set the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:738
uint8_t SwingV7
Definition: ir_MitsubishiHeavy.h:136
const uint8_t kMitsubishiHeavy88SwingVLowest
Definition: ir_MitsubishiHeavy.h:178
const uint8_t kMitsubishiHeavy152SwingHAuto
Definition: ir_MitsubishiHeavy.h:109
const uint8_t kMitsubishiHeavy152SwingHLeft
Definition: ir_MitsubishiHeavy.h:111
Mitsubishi152Protocol _
Definition: ir_MitsubishiHeavy.h:266
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_MitsubishiHeavy.cpp:152
uint8_t raw[kMitsubishiHeavy152StateLength]
State in code form.
Definition: ir_MitsubishiHeavy.h:34
uint8_t Fan
Definition: ir_MitsubishiHeavy.h:53
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_MitsubishiHeavy.cpp:806
const uint8_t kMitsubishiHeavy88SwingHAuto
Definition: ir_MitsubishiHeavy.h:153
const uint8_t kMitsubishiHeavyFan
Definition: ir_MitsubishiHeavy.h:87
bool getFilter(void) const
Get the Filter mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:265
const uint16_t kMitsubishiHeavy88MinRepeat
Definition: IRremoteESP8266.h:1325
const uint8_t kMitsubishiHeavy88SwingHOff
Definition: ir_MitsubishiHeavy.h:152
void setSwingHorizontal(const uint8_t pos)
Set the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:208
uint8_t SwingH2
Definition: ir_MitsubishiHeavy.h:131
static bool validChecksum(const uint8_t *state, const uint16_t length=kMitsubishiHeavy152StateLength)
Verify the checksum is valid for a given state.
Definition: ir_MitsubishiHeavy.cpp:331
const uint8_t kMitsubishiHeavy152SwingVOff
Definition: ir_MitsubishiHeavy.h:107
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_MitsubishiHeavy.cpp:901
const uint8_t kMitsubishiHeavy152SwingVLowest
Definition: ir_MitsubishiHeavy.h:106
Native representation of a Mitsubishi Heavy 88-bit A/C message.
Definition: ir_MitsubishiHeavy.h:120
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:113
const uint8_t kMitsubishiHeavy88SwingHLeftRight
Definition: ir_MitsubishiHeavy.h:160
const uint8_t kMitsubishiHeavy88FanAuto
Definition: ir_MitsubishiHeavy.h:163
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:174
static stdAc::swingh_t toCommonSwingH(const uint8_t pos)
Convert a native horizontal swing postion to it's common equivalent.
Definition: ir_MitsubishiHeavy.cpp:427
bool get3D(void) const
Get the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:761
uint8_t Power
Definition: ir_MitsubishiHeavy.h:142
const uint8_t kMitsubishiHeavy88FanMed
Definition: ir_MitsubishiHeavy.h:165
void setTurbo(const bool on)
Set the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:284
const uint8_t kMitsubishiHeavy88SwingHRightMax
Definition: ir_MitsubishiHeavy.h:158
bool getSilent(void) const
Get the Silent (Quiet) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:253
void setPower(const bool on)
Change the power setting.
Definition: ir_MitsubishiHeavy.cpp:605
uint8_t Clean
Definition: ir_MitsubishiHeavy.h:42
const uint8_t kMitsubishiHeavy152FanHigh
Definition: ir_MitsubishiHeavy.h:96
void setFilter(const bool on)
Set the Filter mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:259
static bool validChecksum(const uint8_t *state, const uint16_t length=kMitsubishiHeavy88StateLength)
Verify the checksum is valid for a given state.
Definition: ir_MitsubishiHeavy.cpp:798
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_MitsubishiHeavy.cpp:566
const uint8_t kMitsubishiHeavy152SwingHRightMax
Definition: ir_MitsubishiHeavy.h:114
void set3D(const bool on)
Set the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:232
const uint8_t kMitsubishiHeavy152SwingHMiddle
Definition: ir_MitsubishiHeavy.h:112
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_MitsubishiHeavy.cpp:370
Class for handling detailed Mitsubishi Heavy 88-bit A/C messages.
Definition: ir_MitsubishiHeavy.h:271
uint8_t getSwingVertical(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:692
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_MitsubishiHeavy.cpp:927
const uint8_t kMitsubishiHeavy152FanTurbo
Definition: ir_MitsubishiHeavy.h:99
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_MitsubishiHeavy.cpp:442
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_MitsubishiHeavy.cpp:456
static uint8_t convertSwingH(const stdAc::swingh_t position)
Convert a stdAc::swingh_t enum into it's native setting.
Definition: ir_MitsubishiHeavy.cpp:843
const uint8_t kMitsubishiHeavyDry
Definition: ir_MitsubishiHeavy.h:86
static stdAc::swingh_t toCommonSwingH(const uint8_t pos)
Convert a native horizontal swing postion to it's common equivalent.
Definition: ir_MitsubishiHeavy.cpp:872
Structure to hold a common A/C state.
Definition: IRsend.h:114
Native representation of a Mitsubishi Heavy 152-bit A/C message.
Definition: ir_MitsubishiHeavy.h:33
bool getEcono(void) const
Get the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:746
uint8_t Temp
Definition: ir_MitsubishiHeavy.h:143
const uint8_t kMitsubishiHeavy88SwingVHigh
Definition: ir_MitsubishiHeavy.h:175
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_MitsubishiHeavy.cpp:887
void send(const uint16_t repeat=kMitsubishiHeavy88MinRepeat)
Send the current internal state as an IR message.
Definition: ir_MitsubishiHeavy.cpp:571
void send(const uint16_t repeat=kMitsubishiHeavy152MinRepeat)
Send the current internal state as an IR message.
Definition: ir_MitsubishiHeavy.cpp:90
const uint8_t kMitsubishiHeavyAuto
Definition: ir_MitsubishiHeavy.h:84
const uint8_t kMitsubishiHeavy152FanEcono
Definition: ir_MitsubishiHeavy.h:98
uint8_t SwingV
Definition: ir_MitsubishiHeavy.h:62
const uint8_t kMitsubishiHeavy152FanMax
Definition: ir_MitsubishiHeavy.h:97
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49