IRremoteESP8266

ir_MitsubishiHeavy.h
Go to the documentation of this file.
1 // Copyright 2019 David Conran
2
12
13 // Supports:
14 // Brand: Mitsubishi Heavy Industries, Model: RLA502A700B remote (152 bit)
15 // Brand: Mitsubishi Heavy Industries, Model: SRKxxZM-S A/C (152 bit)
16 // Brand: Mitsubishi Heavy Industries, Model: SRKxxZMXA-S A/C (152 bit)
17 // Brand: Mitsubishi Heavy Industries, Model: RKX502A001C remote (88 bit)
18 // Brand: Mitsubishi Heavy Industries, Model: SRKxxZJ-S A/C (88 bit)
19
20 #ifndef IR_MITSUBISHIHEAVY_H_
21 #define IR_MITSUBISHIHEAVY_H_
22
23 #ifndef UNIT_TEST
24 #include <Arduino.h>
25 #endif
26 #include "IRremoteESP8266.h"
27 #include "IRsend.h"
28 #ifdef UNIT_TEST
29 #include "IRsend_test.h"
30 #endif
31
33 union Mitsubishi152Protocol{
34 uint8_t raw[kMitsubishiHeavy152StateLength];
35 struct {
36 // Byte 0~4
37 uint8_t Sig[5];
38 // Byte 5
39 uint8_t Mode :3;
40 uint8_t Power :1;
41 uint8_t :1;
42 uint8_t Clean :1;
43 uint8_t Filter:1;
44 uint8_t :1;
45 // Byte 6
46 uint8_t :8;
47 // Byte 7
48 uint8_t Temp :4;
49 uint8_t :4;
50 // Byte 8
51 uint8_t :8;
52 // Byte 9
53 uint8_t Fan :4;
54 uint8_t :4;
55 // Byte 10
56 uint8_t :8;
57 // Byte 11
58 uint8_t :1;
59 uint8_t Three :1;
60 uint8_t :2;
61 uint8_t D :1; // binding with "Three"
62 uint8_t SwingV :3;
63 // Byte 12
64 uint8_t :8;
65 // Byte 13
66 uint8_t SwingH :4;
67 uint8_t :4;
68 // Byte 14
69 uint8_t :8;
70 // Byte 15
71 uint8_t :6;
72 uint8_t Night :1;
73 uint8_t Silent :1;
74 };
75 };
76
77 // Constants.
78 const uint8_t kMitsubishiHeavySigLength = 5;
79
80 // ZMS (152 bit)
81 const uint8_t kMitsubishiHeavyZmsSig[kMitsubishiHeavySigLength] = {
82 0xAD, 0x51, 0x3C, 0xE5, 0x1A};
83
84 const uint8_t kMitsubishiHeavyAuto = 0; // 0b000
85 const uint8_t kMitsubishiHeavyCool = 1; // 0b001
86 const uint8_t kMitsubishiHeavyDry = 2; // 0b010
87 const uint8_t kMitsubishiHeavyFan = 3; // 0b011
88 const uint8_t kMitsubishiHeavyHeat = 4; // 0b100
89
90 const uint8_t kMitsubishiHeavyMinTemp = 17; // 17C
91 const uint8_t kMitsubishiHeavyMaxTemp = 31; // 31C
92
93 const uint8_t kMitsubishiHeavy152FanAuto = 0x0; // 0b0000
94 const uint8_t kMitsubishiHeavy152FanLow = 0x1; // 0b0001
95 const uint8_t kMitsubishiHeavy152FanMed = 0x2; // 0b0010
96 const uint8_t kMitsubishiHeavy152FanHigh = 0x3; // 0b0011
97 const uint8_t kMitsubishiHeavy152FanMax = 0x4; // 0b0100
98 const uint8_t kMitsubishiHeavy152FanEcono = 0x6; // 0b0110
99 const uint8_t kMitsubishiHeavy152FanTurbo = 0x8; // 0b1000
100
101 const uint8_t kMitsubishiHeavy152SwingVAuto = 0; // 0b000
102 const uint8_t kMitsubishiHeavy152SwingVHighest = 1; // 0b001
103 const uint8_t kMitsubishiHeavy152SwingVHigh = 2; // 0b010
104 const uint8_t kMitsubishiHeavy152SwingVMiddle = 3; // 0b011
105 const uint8_t kMitsubishiHeavy152SwingVLow = 4; // 0b100
106 const uint8_t kMitsubishiHeavy152SwingVLowest = 5; // 0b101
107 const uint8_t kMitsubishiHeavy152SwingVOff = 6; // 0b110
108
109 const uint8_t kMitsubishiHeavy152SwingHAuto = 0; // 0b0000
110 const uint8_t kMitsubishiHeavy152SwingHLeftMax = 1; // 0b0001
111 const uint8_t kMitsubishiHeavy152SwingHLeft = 2; // 0b0010
112 const uint8_t kMitsubishiHeavy152SwingHMiddle = 3; // 0b0011
113 const uint8_t kMitsubishiHeavy152SwingHRight = 4; // 0b0100
114 const uint8_t kMitsubishiHeavy152SwingHRightMax = 5; // 0b0101
115 const uint8_t kMitsubishiHeavy152SwingHRightLeft = 6; // 0b0110
116 const uint8_t kMitsubishiHeavy152SwingHLeftRight = 7; // 0b0111
117 const uint8_t kMitsubishiHeavy152SwingHOff = 8; // 0b1000
118
120 union Mitsubishi88Protocol{
121 uint8_t raw[kMitsubishiHeavy88StateLength];
122 struct {
123 // Byte 0~4
124 uint8_t Sig[5];
125 // Byte 5
126 uint8_t :1;
127 uint8_t SwingV5 :1;
128 uint8_t SwingH1 :2;
129 uint8_t :1;
130 uint8_t Clean :1;
131 uint8_t SwingH2 :2;
132 // Byte 6
133 uint8_t :8;
134 // Byte 7
135 uint8_t :3;
136 uint8_t SwingV7 :2;
137 uint8_t Fan :3;
138 // Byte 8
139 uint8_t :8;
140 // Byte 9
141 uint8_t Mode :3;
142 uint8_t Power :1;
143 uint8_t Temp :4;
144 };
145 };
146
147 // ZJS (88 bit)
148 const uint8_t kMitsubishiHeavyZjsSig[kMitsubishiHeavySigLength] = {
149 0xAD, 0x51, 0x3C, 0xD9, 0x26};
150
151 const uint8_t kMitsubishiHeavy88SwingHSize = 2; // Bits (per offset)
152 const uint8_t kMitsubishiHeavy88SwingHOff = 0b0000;
153 const uint8_t kMitsubishiHeavy88SwingHAuto = 0b1000;
154 const uint8_t kMitsubishiHeavy88SwingHLeftMax = 0b0001;
155 const uint8_t kMitsubishiHeavy88SwingHLeft = 0b0101;
156 const uint8_t kMitsubishiHeavy88SwingHMiddle = 0b1001;
157 const uint8_t kMitsubishiHeavy88SwingHRight = 0b1101;
158 const uint8_t kMitsubishiHeavy88SwingHRightMax = 0b0010;
159 const uint8_t kMitsubishiHeavy88SwingHRightLeft = 0b1010;
160 const uint8_t kMitsubishiHeavy88SwingHLeftRight = 0b0110;
161 const uint8_t kMitsubishiHeavy88SwingH3D = 0b1110;
162
163 const uint8_t kMitsubishiHeavy88FanAuto = 0; // 0b000
164 const uint8_t kMitsubishiHeavy88FanLow = 2; // 0b010
165 const uint8_t kMitsubishiHeavy88FanMed = 3; // 0b011
166 const uint8_t kMitsubishiHeavy88FanHigh = 4; // 0b100
167 const uint8_t kMitsubishiHeavy88FanTurbo = 6; // 0b110
168 const uint8_t kMitsubishiHeavy88FanEcono = 7; // 0b111
169 const uint8_t kMitsubishiHeavy88SwingVByte5Size = 1;
170
171 // Mask 0b111
172 const uint8_t kMitsubishiHeavy88SwingVOff = 0b000; // 0
173 const uint8_t kMitsubishiHeavy88SwingVAuto = 0b100; // 4
174 const uint8_t kMitsubishiHeavy88SwingVHighest = 0b110; // 6
175 const uint8_t kMitsubishiHeavy88SwingVHigh = 0b001; // 1
176 const uint8_t kMitsubishiHeavy88SwingVMiddle = 0b011; // 3
177 const uint8_t kMitsubishiHeavy88SwingVLow = 0b101; // 5
178 const uint8_t kMitsubishiHeavy88SwingVLowest = 0b111; // 7
179
180
181 // Classes
182
184 class IRMitsubishiHeavy152Ac {
185 public:
186 explicit IRMitsubishiHeavy152Ac(const uint16_t pin,
187 const bool inverted = false,
188 const bool use_modulation = true);
189 void stateReset(void);
190 #if SEND_MITSUBISHIHEAVY
191 void send(const uint16_t repeat = kMitsubishiHeavy152MinRepeat);
196 int8_t calibrate(void) { return _irsend.calibrate(); }
197 #endif // SEND_MITSUBISHIHEAVY
198 void begin(void);
199 void on(void);
200 void off(void);
201
202 void setPower(const bool on);
203 bool getPower(void) const;
204
205 void setTemp(const uint8_t temp);
206 uint8_t getTemp(void) const;
207
208 void setFan(const uint8_t fan);
209 uint8_t getFan(void) const;
210
211 void setMode(const uint8_t mode);
212 uint8_t getMode(void) const;
213
214 void setSwingVertical(const uint8_t pos);
215 uint8_t getSwingVertical(void) const;
216 void setSwingHorizontal(const uint8_t pos);
217 uint8_t getSwingHorizontal(void) const;
218
219 void setNight(const bool on);
220 bool getNight(void) const;
221
222 void set3D(const bool on);
223 bool get3D(void) const;
224
225 void setSilent(const bool on);
226 bool getSilent(void) const;
227
228 void setFilter(const bool on);
229 bool getFilter(void) const;
230
231 void setClean(const bool on);
232 bool getClean(void) const;
233
234 void setTurbo(const bool on);
235 bool getTurbo(void) const;
236
237 void setEcono(const bool on);
238 bool getEcono(void) const;
239
240 uint8_t* getRaw(void);
241 void setRaw(const uint8_t* data);
242
243 static bool checkZmsSig(const uint8_t *state);
244 static bool validChecksum(
245 const uint8_t *state,
246 const uint16_t length = kMitsubishiHeavy152StateLength);
247 static uint8_t convertMode(const stdAc::opmode_t mode);
248 static uint8_t convertFan(const stdAc::fanspeed_t speed);
249 static uint8_t convertSwingV(const stdAc::swingv_t position);
250 static uint8_t convertSwingH(const stdAc::swingh_t position);
251 static stdAc::opmode_t toCommonMode(const uint8_t mode);
252 static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
253 static stdAc::swingv_t toCommonSwingV(const uint8_t pos);
254 static stdAc::swingh_t toCommonSwingH(const uint8_t pos);
255 stdAc::state_t toCommon(void) const;
256 String toString(void) const;
257 #ifndef UNIT_TEST
258
259 private:
260 IRsend _irsend;
261 #else // UNIT_TEST
262 IRsendTest _irsend;
264 #endif // UNIT_TEST
266 Mitsubishi152Protocol _;
267 void checksum(void);
268 };
269
271 class IRMitsubishiHeavy88Ac {
272 public:
273 explicit IRMitsubishiHeavy88Ac(const uint16_t pin,
274 const bool inverted = false,
275 const bool use_modulation = true);
276 void stateReset(void);
277 #if SEND_MITSUBISHIHEAVY
278 void send(const uint16_t repeat = kMitsubishiHeavy88MinRepeat);
283 int8_t calibrate(void) { return _irsend.calibrate(); }
284 #endif // SEND_MITSUBISHIHEAVY
285 void begin(void);
286 void on(void);
287 void off(void);
288
289 void setPower(const bool on);
290 bool getPower(void) const;
291
292 void setTemp(const uint8_t temp);
293 uint8_t getTemp(void) const;
294
295 void setFan(const uint8_t fan);
296 uint8_t getFan(void) const;
297
298 void setMode(const uint8_t mode);
299 uint8_t getMode(void) const;
300
301 void setSwingVertical(const uint8_t pos);
302 uint8_t getSwingVertical(void) const;
303 void setSwingHorizontal(const uint8_t pos);
304 uint8_t getSwingHorizontal(void) const;
305
306 void setTurbo(const bool on);
307 bool getTurbo(void) const;
308
309 void setEcono(const bool on);
310 bool getEcono(void) const;
311
312 void set3D(const bool on);
313 bool get3D(void) const;
314
315 void setClean(const bool on);
316 bool getClean(void) const;
317
318 uint8_t* getRaw(void);
319 void setRaw(const uint8_t* data);
320
321 static bool checkZjsSig(const uint8_t *state);
322 static bool validChecksum(
323 const uint8_t *state,
324 const uint16_t length = kMitsubishiHeavy88StateLength);
325 static uint8_t convertMode(const stdAc::opmode_t mode);
326 static uint8_t convertFan(const stdAc::fanspeed_t speed);
327 static uint8_t convertSwingV(const stdAc::swingv_t position);
328 static uint8_t convertSwingH(const stdAc::swingh_t position);
329 static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
330 static stdAc::swingv_t toCommonSwingV(const uint8_t pos);
331 static stdAc::swingh_t toCommonSwingH(const uint8_t pos);
332 stdAc::state_t toCommon(void) const;
333 String toString(void) const;
334 #ifndef UNIT_TEST
335
336 private:
337 IRsend _irsend;
338 #else // UNIT_TEST
339 IRsendTest _irsend;
341 #endif // UNIT_TEST
343 Mitsubishi88Protocol _;
344 void checksum(void);
345 };
346 #endif // IR_MITSUBISHIHEAVY_H_
IRMitsubishiHeavy88Ac::getClean
bool getClean(void) const
Get the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:773
IRMitsubishiHeavy88Ac::setFan
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_MitsubishiHeavy.cpp:632
IRMitsubishiHeavy88Ac::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_MitsubishiHeavy.cpp:647
IRMitsubishiHeavy88Ac::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_MitsubishiHeavy.cpp:601
kMitsubishiHeavy88SwingVByte5Size
const uint8_t kMitsubishiHeavy88SwingVByte5Size
Definition: ir_MitsubishiHeavy.h:169
Mitsubishi88Protocol::Fan
uint8_t Fan
Definition: ir_MitsubishiHeavy.h:137
kMitsubishiHeavy152StateLength
const uint16_t kMitsubishiHeavy152StateLength
Definition: IRremoteESP8266.h:1326
IRMitsubishiHeavy152Ac::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_MitsubishiHeavy.h:196
IRMitsubishiHeavy152Ac
Class for handling detailed Mitsubishi Heavy 152-bit A/C messages.
Definition: ir_MitsubishiHeavy.h:184
IRMitsubishiHeavy88Ac::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_MitsubishiHeavy.cpp:578
IRMitsubishiHeavy152Ac::checksum
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
kMitsubishiHeavy152SwingVHigh
const uint8_t kMitsubishiHeavy152SwingVHigh
Definition: ir_MitsubishiHeavy.h:103
Mitsubishi152Protocol::Mode
uint8_t Mode
Definition: ir_MitsubishiHeavy.h:39
IRMitsubishiHeavy152Ac::toString
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_MitsubishiHeavy.cpp:482
Mitsubishi152Protocol::Filter
uint8_t Filter
Definition: ir_MitsubishiHeavy.h:43
IRMitsubishiHeavy152Ac::convertSwingH
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
kMitsubishiHeavy152SwingHRightLeft
const uint8_t kMitsubishiHeavy152SwingHRightLeft
Definition: ir_MitsubishiHeavy.h:115
IRMitsubishiHeavy152Ac::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_MitsubishiHeavy.cpp:342
Mitsubishi152Protocol::D
uint8_t D
Definition: ir_MitsubishiHeavy.h:61
IRMitsubishiHeavy152Ac::getNight
bool getNight(void) const
Get the Night (Sleep) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:226
IRMitsubishiHeavy88Ac::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_MitsubishiHeavy.cpp:858
IRMitsubishiHeavy88Ac::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_MitsubishiHeavy.cpp:611
IRMitsubishiHeavy152Ac::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_MitsubishiHeavy.cpp:125
IRMitsubishiHeavy88Ac::set3D
void set3D(const bool on)
Set the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:752
stdAc::swingv_t
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:74
kMitsubishiHeavy152FanMed
const uint8_t kMitsubishiHeavy152FanMed
Definition: ir_MitsubishiHeavy.h:95
IRMitsubishiHeavy88Ac::setSwingHorizontal
void setSwingHorizontal(const uint8_t pos)
Set the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:698
IRMitsubishiHeavy152Ac::getTemp
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_MitsubishiHeavy.cpp:146
Mitsubishi88Protocol::Clean
uint8_t Clean
Definition: ir_MitsubishiHeavy.h:130
IRMitsubishiHeavy152Ac::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_MitsubishiHeavy.h:260
kMitsubishiHeavy152FanAuto
const uint8_t kMitsubishiHeavy152FanAuto
Definition: ir_MitsubishiHeavy.h:93
IRMitsubishiHeavy152Ac::IRMitsubishiHeavy152Ac
IRMitsubishiHeavy152Ac(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_MitsubishiHeavy.cpp:79
stdAc::fanspeed_t
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
Mitsubishi152Protocol::SwingH
uint8_t SwingH
Definition: ir_MitsubishiHeavy.h:66
kMitsubishiHeavy152SwingVAuto
const uint8_t kMitsubishiHeavy152SwingVAuto
Definition: ir_MitsubishiHeavy.h:101
IRMitsubishiHeavy88Ac::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:653
kMitsubishiHeavy88FanTurbo
const uint8_t kMitsubishiHeavy88FanTurbo
Definition: ir_MitsubishiHeavy.h:167
IRMitsubishiHeavy88Ac::convertFan
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
Mitsubishi152Protocol::Silent
uint8_t Silent
Definition: ir_MitsubishiHeavy.h:73
kMitsubishiHeavy88SwingHLeftMax
const uint8_t kMitsubishiHeavy88SwingHLeftMax
Definition: ir_MitsubishiHeavy.h:154
kMitsubishiHeavy152SwingVHighest
const uint8_t kMitsubishiHeavy152SwingVHighest
Definition: ir_MitsubishiHeavy.h:102
kMitsubishiHeavy88SwingH3D
const uint8_t kMitsubishiHeavy88SwingH3D
Definition: ir_MitsubishiHeavy.h:161
kMitsubishiHeavy88SwingHLeft
const uint8_t kMitsubishiHeavy88SwingHLeft
Definition: ir_MitsubishiHeavy.h:155
IRMitsubishiHeavy88Ac::_
Mitsubishi88Protocol _
Definition: ir_MitsubishiHeavy.h:343
kMitsubishiHeavy152SwingVLow
const uint8_t kMitsubishiHeavy152SwingVLow
Definition: ir_MitsubishiHeavy.h:105
kMitsubishiHeavy152SwingHOff
const uint8_t kMitsubishiHeavy152SwingHOff
Definition: ir_MitsubishiHeavy.h:117
IRMitsubishiHeavy152Ac::getSwingHorizontal
uint8_t getSwingHorizontal(void) const
Get the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:214
IRMitsubishiHeavy152Ac::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_MitsubishiHeavy.cpp:97
IRsend.h
kMitsubishiHeavy152SwingHLeftRight
const uint8_t kMitsubishiHeavy152SwingHLeftRight
Definition: ir_MitsubishiHeavy.h:116
IRMitsubishiHeavy88Ac::checksum
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
kMitsubishiHeavy88SwingHMiddle
const uint8_t kMitsubishiHeavy88SwingHMiddle
Definition: ir_MitsubishiHeavy.h:156
IRMitsubishiHeavy152Ac::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_MitsubishiHeavy.cpp:413
IRMitsubishiHeavy88Ac::on
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_MitsubishiHeavy.cpp:598
Mitsubishi152Protocol::Sig
uint8_t Sig[5]
Definition: ir_MitsubishiHeavy.h:37
kMitsubishiHeavy88SwingVAuto
const uint8_t kMitsubishiHeavy88SwingVAuto
Definition: ir_MitsubishiHeavy.h:173
IRMitsubishiHeavy152Ac::getClean
bool getClean(void) const
Get the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:278
IRMitsubishiHeavy88Ac::setClean
void setClean(const bool on)
Set the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:767
IRMitsubishiHeavy152Ac::setSilent
void setSilent(const bool on)
Set the Silent (Quiet) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:247
IRMitsubishiHeavy152Ac::getTurbo
bool getTurbo(void) const
Get the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:292
IRMitsubishiHeavy88Ac::getTurbo
bool getTurbo(void) const
Get the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:732
IRsend
Class for sending all basic IR protocols.
Definition: IRsend.h:237
kMitsubishiHeavy88FanEcono
const uint8_t kMitsubishiHeavy88FanEcono
Definition: ir_MitsubishiHeavy.h:168
IRMitsubishiHeavy88Ac::setSwingVertical
void setSwingVertical(const uint8_t pos)
Set the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:675
IRsend::calibrate
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
kMitsubishiHeavy88SwingHSize
const uint8_t kMitsubishiHeavy88SwingHSize
Definition: ir_MitsubishiHeavy.h:151
IRMitsubishiHeavy152Ac::setClean
void setClean(const bool on)
Set the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:271
IRMitsubishiHeavy152Ac::setTemp
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_MitsubishiHeavy.cpp:137
IRMitsubishiHeavy152Ac::on
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_MitsubishiHeavy.cpp:118
String
std::string String
Definition: IRremoteESP8266.h:1521
IRMitsubishiHeavy152Ac::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_MitsubishiHeavy.cpp:85
IRMitsubishiHeavy88Ac::convertSwingV
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
IRMitsubishiHeavy152Ac::setNight
void setNight(const bool on)
Set the Night (Sleep) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:220
Mitsubishi152Protocol::Night
uint8_t Night
Definition: ir_MitsubishiHeavy.h:72
IRMitsubishiHeavy88Ac::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_MitsubishiHeavy.h:337
kMitsubishiHeavySigLength
const uint8_t kMitsubishiHeavySigLength
Definition: ir_MitsubishiHeavy.h:78
Mitsubishi88Protocol::SwingV5
uint8_t SwingV5
Definition: ir_MitsubishiHeavy.h:127
IRMitsubishiHeavy152Ac::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_MitsubishiHeavy.cpp:121
IRMitsubishiHeavy152Ac::setSwingVertical
void setSwingVertical(const uint8_t pos)
Set the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:196
kMitsubishiHeavy88SwingHRightLeft
const uint8_t kMitsubishiHeavy88SwingHRightLeft
Definition: ir_MitsubishiHeavy.h:159
kMitsubishiHeavy152SwingHRight
const uint8_t kMitsubishiHeavy152SwingHRight
Definition: ir_MitsubishiHeavy.h:113
kMitsubishiHeavyHeat
const uint8_t kMitsubishiHeavyHeat
Definition: ir_MitsubishiHeavy.h:88
IRMitsubishiHeavy88Ac::setTurbo
void setTurbo(const bool on)
Set the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:724
IRremoteESP8266.h
stdAc::swingh_t
swingh_t
Common A/C settings for Horizontal Swing.
Definition: IRsend.h:100
kMitsubishiHeavy152SwingHLeftMax
const uint8_t kMitsubishiHeavy152SwingHLeftMax
Definition: ir_MitsubishiHeavy.h:110
Mitsubishi88Protocol::SwingH1
uint8_t SwingH1
Definition: ir_MitsubishiHeavy.h:128
kMitsubishiHeavyZmsSig
const uint8_t kMitsubishiHeavyZmsSig[kMitsubishiHeavySigLength]
Definition: ir_MitsubishiHeavy.h:81
IRMitsubishiHeavy152Ac::getEcono
bool getEcono(void) const
Get the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:306
IRMitsubishiHeavy152Ac::get3D
bool get3D(void) const
Get the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:241
kMitsubishiHeavy152MinRepeat
const uint16_t kMitsubishiHeavy152MinRepeat
Definition: IRremoteESP8266.h:1328
IRMitsubishiHeavy88Ac::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_MitsubishiHeavy.h:283
IRMitsubishiHeavy152Ac::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_MitsubishiHeavy.cpp:168
Mitsubishi152Protocol::Temp
uint8_t Temp
Definition: ir_MitsubishiHeavy.h:48
IRMitsubishiHeavy88Ac::checkZjsSig
static bool checkZjsSig(const uint8_t *state)
Verify the given state has a ZJ-S signature.
Definition: ir_MitsubishiHeavy.cpp:780
IRMitsubishiHeavy88Ac::setTemp
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_MitsubishiHeavy.cpp:617
IRMitsubishiHeavy152Ac::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_MitsubishiHeavy.cpp:131
IRMitsubishiHeavy88Ac::IRMitsubishiHeavy88Ac
IRMitsubishiHeavy88Ac(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_MitsubishiHeavy.cpp:560
Mitsubishi88Protocol::Sig
uint8_t Sig[5]
Definition: ir_MitsubishiHeavy.h:124
kMitsubishiHeavyMaxTemp
const uint8_t kMitsubishiHeavyMaxTemp
Definition: ir_MitsubishiHeavy.h:91
IRMitsubishiHeavy88Ac::setRaw
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:593
kMitsubishiHeavy88StateLength
const uint16_t kMitsubishiHeavy88StateLength
Definition: IRremoteESP8266.h:1323
kMitsubishiHeavy88SwingVMiddle
const uint8_t kMitsubishiHeavy88SwingVMiddle
Definition: ir_MitsubishiHeavy.h:176
IRMitsubishiHeavy152Ac::convertFan
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
kMitsubishiHeavyZjsSig
const uint8_t kMitsubishiHeavyZjsSig[kMitsubishiHeavySigLength]
Definition: ir_MitsubishiHeavy.h:148
kMitsubishiHeavy152FanLow
const uint8_t kMitsubishiHeavy152FanLow
Definition: ir_MitsubishiHeavy.h:94
kMitsubishiHeavy88FanHigh
const uint8_t kMitsubishiHeavy88FanHigh
Definition: ir_MitsubishiHeavy.h:166
IRMitsubishiHeavy152Ac::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_MitsubishiHeavy.cpp:400
Mitsubishi152Protocol::Three
uint8_t Three
Definition: ir_MitsubishiHeavy.h:59
IRMitsubishiHeavy152Ac::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:106
kMitsubishiHeavyMinTemp
const uint8_t kMitsubishiHeavyMinTemp
Definition: ir_MitsubishiHeavy.h:90
Mitsubishi152Protocol::Power
uint8_t Power
Definition: ir_MitsubishiHeavy.h:40
kMitsubishiHeavyCool
const uint8_t kMitsubishiHeavyCool
Definition: ir_MitsubishiHeavy.h:85
IRMitsubishiHeavy152Ac::setEcono
void setEcono(const bool on)
Set the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:298
IRMitsubishiHeavy88Ac::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:586
kMitsubishiHeavy88FanLow
const uint8_t kMitsubishiHeavy88FanLow
Definition: ir_MitsubishiHeavy.h:164
IRMitsubishiHeavy88Ac::getTemp
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_MitsubishiHeavy.cpp:626
Mitsubishi88Protocol::raw
uint8_t raw[kMitsubishiHeavy88StateLength]
State in code form.
Definition: ir_MitsubishiHeavy.h:121
kMitsubishiHeavy88SwingVLow
const uint8_t kMitsubishiHeavy88SwingVLow
Definition: ir_MitsubishiHeavy.h:177
IRMitsubishiHeavy152Ac::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_MitsubishiHeavy.cpp:190
IRMitsubishiHeavy88Ac::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_MitsubishiHeavy.cpp:669
IRMitsubishiHeavy152Ac::checkZmsSig
static bool checkZmsSig(const uint8_t *state)
Verify the given state has a ZM-S signature.
Definition: ir_MitsubishiHeavy.cpp:313
kMitsubishiHeavy152SwingVMiddle
const uint8_t kMitsubishiHeavy152SwingVMiddle
Definition: ir_MitsubishiHeavy.h:104
kMitsubishiHeavy88SwingHRight
const uint8_t kMitsubishiHeavy88SwingHRight
Definition: ir_MitsubishiHeavy.h:157
kMitsubishiHeavy88SwingVHighest
const uint8_t kMitsubishiHeavy88SwingVHighest
Definition: ir_MitsubishiHeavy.h:174
Mitsubishi88Protocol::Mode
uint8_t Mode
Definition: ir_MitsubishiHeavy.h:141
IRMitsubishiHeavy88Ac::getSwingHorizontal
uint8_t getSwingHorizontal(void) const
Get the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:718
kMitsubishiHeavy88SwingVOff
const uint8_t kMitsubishiHeavy88SwingVOff
Definition: ir_MitsubishiHeavy.h:172
IRMitsubishiHeavy152Ac::getSwingVertical
uint8_t getSwingVertical(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:202
IRMitsubishiHeavy88Ac::setEcono
void setEcono(const bool on)
Set the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:738
Mitsubishi88Protocol::SwingV7
uint8_t SwingV7
Definition: ir_MitsubishiHeavy.h:136
kMitsubishiHeavy88SwingVLowest
const uint8_t kMitsubishiHeavy88SwingVLowest
Definition: ir_MitsubishiHeavy.h:178
kMitsubishiHeavy152SwingHAuto
const uint8_t kMitsubishiHeavy152SwingHAuto
Definition: ir_MitsubishiHeavy.h:109
kMitsubishiHeavy152SwingHLeft
const uint8_t kMitsubishiHeavy152SwingHLeft
Definition: ir_MitsubishiHeavy.h:111
IRMitsubishiHeavy152Ac::_
Mitsubishi152Protocol _
Definition: ir_MitsubishiHeavy.h:266
IRMitsubishiHeavy152Ac::setFan
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_MitsubishiHeavy.cpp:152
Mitsubishi152Protocol::raw
uint8_t raw[kMitsubishiHeavy152StateLength]
State in code form.
Definition: ir_MitsubishiHeavy.h:34
Mitsubishi152Protocol::Fan
uint8_t Fan
Definition: ir_MitsubishiHeavy.h:53
IRMitsubishiHeavy88Ac::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_MitsubishiHeavy.cpp:806
kMitsubishiHeavy88SwingHAuto
const uint8_t kMitsubishiHeavy88SwingHAuto
Definition: ir_MitsubishiHeavy.h:153
kMitsubishiHeavyFan
const uint8_t kMitsubishiHeavyFan
Definition: ir_MitsubishiHeavy.h:87
IRMitsubishiHeavy152Ac::getFilter
bool getFilter(void) const
Get the Filter mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:265
kMitsubishiHeavy88MinRepeat
const uint16_t kMitsubishiHeavy88MinRepeat
Definition: IRremoteESP8266.h:1325
kMitsubishiHeavy88SwingHOff
const uint8_t kMitsubishiHeavy88SwingHOff
Definition: ir_MitsubishiHeavy.h:152
IRMitsubishiHeavy152Ac::setSwingHorizontal
void setSwingHorizontal(const uint8_t pos)
Set the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:208
Mitsubishi88Protocol::SwingH2
uint8_t SwingH2
Definition: ir_MitsubishiHeavy.h:131
IRMitsubishiHeavy152Ac::validChecksum
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
kMitsubishiHeavy152SwingVOff
const uint8_t kMitsubishiHeavy152SwingVOff
Definition: ir_MitsubishiHeavy.h:107
IRMitsubishiHeavy88Ac::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_MitsubishiHeavy.cpp:901
kMitsubishiHeavy152SwingVLowest
const uint8_t kMitsubishiHeavy152SwingVLowest
Definition: ir_MitsubishiHeavy.h:106
Mitsubishi88Protocol
Native representation of a Mitsubishi Heavy 88-bit A/C message.
Definition: ir_MitsubishiHeavy.h:120
IRMitsubishiHeavy152Ac::setRaw
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:113
kMitsubishiHeavy88SwingHLeftRight
const uint8_t kMitsubishiHeavy88SwingHLeftRight
Definition: ir_MitsubishiHeavy.h:160
kMitsubishiHeavy88FanAuto
const uint8_t kMitsubishiHeavy88FanAuto
Definition: ir_MitsubishiHeavy.h:163
IRMitsubishiHeavy152Ac::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:174
IRMitsubishiHeavy152Ac::toCommonSwingH
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
IRMitsubishiHeavy88Ac::get3D
bool get3D(void) const
Get the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:761
Mitsubishi88Protocol::Power
uint8_t Power
Definition: ir_MitsubishiHeavy.h:142
kMitsubishiHeavy88FanMed
const uint8_t kMitsubishiHeavy88FanMed
Definition: ir_MitsubishiHeavy.h:165
IRMitsubishiHeavy152Ac::setTurbo
void setTurbo(const bool on)
Set the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:284
kMitsubishiHeavy88SwingHRightMax
const uint8_t kMitsubishiHeavy88SwingHRightMax
Definition: ir_MitsubishiHeavy.h:158
IRMitsubishiHeavy152Ac::getSilent
bool getSilent(void) const
Get the Silent (Quiet) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:253
IRMitsubishiHeavy88Ac::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_MitsubishiHeavy.cpp:605
Mitsubishi152Protocol::Clean
uint8_t Clean
Definition: ir_MitsubishiHeavy.h:42
kMitsubishiHeavy152FanHigh
const uint8_t kMitsubishiHeavy152FanHigh
Definition: ir_MitsubishiHeavy.h:96
IRMitsubishiHeavy152Ac::setFilter
void setFilter(const bool on)
Set the Filter mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:259
IRMitsubishiHeavy88Ac::validChecksum
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
IRMitsubishiHeavy88Ac::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_MitsubishiHeavy.cpp:566
kMitsubishiHeavy152SwingHRightMax
const uint8_t kMitsubishiHeavy152SwingHRightMax
Definition: ir_MitsubishiHeavy.h:114
IRMitsubishiHeavy152Ac::set3D
void set3D(const bool on)
Set the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:232
kMitsubishiHeavy152SwingHMiddle
const uint8_t kMitsubishiHeavy152SwingHMiddle
Definition: ir_MitsubishiHeavy.h:112
IRMitsubishiHeavy152Ac::convertSwingV
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
IRMitsubishiHeavy88Ac
Class for handling detailed Mitsubishi Heavy 88-bit A/C messages.
Definition: ir_MitsubishiHeavy.h:271
IRMitsubishiHeavy88Ac::getSwingVertical
uint8_t getSwingVertical(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:692
IRMitsubishiHeavy88Ac::toString
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_MitsubishiHeavy.cpp:927
kMitsubishiHeavy152FanTurbo
const uint8_t kMitsubishiHeavy152FanTurbo
Definition: ir_MitsubishiHeavy.h:99
IRMitsubishiHeavy152Ac::toCommonSwingV
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
IRMitsubishiHeavy152Ac::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_MitsubishiHeavy.cpp:456
IRMitsubishiHeavy88Ac::convertSwingH
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
kMitsubishiHeavyDry
const uint8_t kMitsubishiHeavyDry
Definition: ir_MitsubishiHeavy.h:86
IRMitsubishiHeavy88Ac::toCommonSwingH
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
stdAc::state_t
Structure to hold a common A/C state.
Definition: IRsend.h:114
Mitsubishi152Protocol
Native representation of a Mitsubishi Heavy 152-bit A/C message.
Definition: ir_MitsubishiHeavy.h:33
IRMitsubishiHeavy88Ac::getEcono
bool getEcono(void) const
Get the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:746
Mitsubishi88Protocol::Temp
uint8_t Temp
Definition: ir_MitsubishiHeavy.h:143
kMitsubishiHeavy88SwingVHigh
const uint8_t kMitsubishiHeavy88SwingVHigh
Definition: ir_MitsubishiHeavy.h:175
IRMitsubishiHeavy88Ac::toCommonSwingV
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
IRMitsubishiHeavy88Ac::send
void send(const uint16_t repeat=kMitsubishiHeavy88MinRepeat)
Send the current internal state as an IR message.
Definition: ir_MitsubishiHeavy.cpp:571
IRMitsubishiHeavy152Ac::send
void send(const uint16_t repeat=kMitsubishiHeavy152MinRepeat)
Send the current internal state as an IR message.
Definition: ir_MitsubishiHeavy.cpp:90
kMitsubishiHeavyAuto
const uint8_t kMitsubishiHeavyAuto
Definition: ir_MitsubishiHeavy.h:84
kMitsubishiHeavy152FanEcono
const uint8_t kMitsubishiHeavy152FanEcono
Definition: ir_MitsubishiHeavy.h:98
Mitsubishi152Protocol::SwingV
uint8_t SwingV
Definition: ir_MitsubishiHeavy.h:62
kMitsubishiHeavy152FanMax
const uint8_t kMitsubishiHeavy152FanMax
Definition: ir_MitsubishiHeavy.h:97
stdAc::opmode_t
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49