IRremoteESP8266: src/ir_Panasonic.h Source File

IRremoteESP8266

ir_Panasonic.h
Go to the documentation of this file.
1 // Copyright 2018 David Conran
2
6
7 // Supports:
8 // Brand: Panasonic, Model: TV (PANASONIC)
9 // Brand: Panasonic, Model: NKE series A/C (PANASONIC_AC NKE/2)
10 // Brand: Panasonic, Model: DKE series A/C (PANASONIC_AC DKE/3)
11 // Brand: Panasonic, Model: DKW series A/C (PANASONIC_AC DKE/3)
12 // Brand: Panasonic, Model: PKR series A/C (PANASONIC_AC DKE/3)
13 // Brand: Panasonic, Model: JKE series A/C (PANASONIC_AC JKE/4)
14 // Brand: Panasonic, Model: CKP series A/C (PANASONIC_AC CKP/5)
15 // Brand: Panasonic, Model: RKR series A/C (PANASONIC_AC RKR/6)
16 // Brand: Panasonic, Model: CS-ME10CKPG A/C (PANASONIC_AC CKP/5)
17 // Brand: Panasonic, Model: CS-ME12CKPG A/C (PANASONIC_AC CKP/5)
18 // Brand: Panasonic, Model: CS-ME14CKPG A/C (PANASONIC_AC CKP/5)
19 // Brand: Panasonic, Model: CS-E7PKR A/C (PANASONIC_AC DKE/2)
20 // Brand: Panasonic, Model: CS-Z9RKR A/C (PANASONIC_AC RKR/6)
21 // Brand: Panasonic, Model: CS-YW9MKD A/C (PANASONIC_AC JKE/4)
22 // Brand: Panasonic, Model: A75C2311 remote (PANASONIC_AC CKP/5)
23 // Brand: Panasonic, Model: A75C2616-1 remote (PANASONIC_AC DKE/3)
24 // Brand: Panasonic, Model: A75C3704 remote (PANASONIC_AC DKE/3)
25 // Brand: Panasonic, Model: A75C3747 remote (PANASONIC_AC JKE/4)
26 // Brand: Panasonic, Model: CS-E9CKP series A/C (PANASONIC_AC32)
27 // Brand: Panasonic, Model: A75C2295 remote (PANASONIC_AC32)
28
29 #ifndef IR_PANASONIC_H_
30 #define IR_PANASONIC_H_
31
32 #define __STDC_LIMIT_MACROS
33 #include <stdint.h>
34 #ifdef ARDUINO
35 #include <Arduino.h>
36 #endif
37 #include "IRremoteESP8266.h"
38 #include "IRsend.h"
39 #ifdef UNIT_TEST
40 #include "IRsend_test.h"
41 #endif
42
43 // Constants
44 const uint16_t kPanasonicFreq = 36700;
45 const uint16_t kPanasonicAcExcess = 0;
46 // Much higher than usual. See issue #540.
47 const uint16_t kPanasonicAcTolerance = 40;
48
49 const uint8_t kPanasonicAcAuto = 0; // 0b000
50 const uint8_t kPanasonicAcDry = 2; // 0b010
51 const uint8_t kPanasonicAcCool = 3; // 0b011
52 const uint8_t kPanasonicAcHeat = 4; // 0b010
53 const uint8_t kPanasonicAcFan = 6; // 0b110
54 const uint8_t kPanasonicAcFanMin = 0;
55 const uint8_t kPanasonicAcFanMed = 2;
56 const uint8_t kPanasonicAcFanMax = 4;
57 const uint8_t kPanasonicAcFanAuto = 7;
58 const uint8_t kPanasonicAcFanDelta = 3;
59 const uint8_t kPanasonicAcPowerOffset = 0;
60 const uint8_t kPanasonicAcTempOffset = 1; // Bits
61 const uint8_t kPanasonicAcTempSize = 5; // Bits
62 const uint8_t kPanasonicAcMinTemp = 16; // Celsius
63 const uint8_t kPanasonicAcMaxTemp = 30; // Celsius
64 const uint8_t kPanasonicAcFanModeTemp = 27; // Celsius
65 const uint8_t kPanasonicAcQuietOffset = 0;
66 const uint8_t kPanasonicAcPowerfulOffset = 5; // 0b100000
67 // CKP & RKR models have Powerful and Quiet bits swapped.
68 const uint8_t kPanasonicAcQuietCkpOffset = kPanasonicAcPowerfulOffset;
69 const uint8_t kPanasonicAcPowerfulCkpOffset = kPanasonicAcQuietOffset;
70 const uint8_t kPanasonicAcSwingVHighest = 0x1; // 0b0001
71 const uint8_t kPanasonicAcSwingVHigh = 0x2; // 0b0010
72 const uint8_t kPanasonicAcSwingVMiddle = 0x3; // 0b0011
73 const uint8_t kPanasonicAcSwingVLow = 0x4; // 0b0100
74 const uint8_t kPanasonicAcSwingVLowest = 0x5; // 0b0101
75 const uint8_t kPanasonicAcSwingVAuto = 0xF; // 0b1111
76
77 const uint8_t kPanasonicAcSwingHMiddle = 0x6; // 0b0110
78 const uint8_t kPanasonicAcSwingHFullLeft = 0x9; // 0b1001
79 const uint8_t kPanasonicAcSwingHLeft = 0xA; // 0b1010
80 const uint8_t kPanasonicAcSwingHRight = 0xB; // 0b1011
81 const uint8_t kPanasonicAcSwingHFullRight = 0xC; // 0b1100
82 const uint8_t kPanasonicAcSwingHAuto = 0xD; // 0b1101
83 const uint8_t kPanasonicAcChecksumInit = 0xF4;
84 const uint8_t kPanasonicAcOnTimerOffset = 1;
85 const uint8_t kPanasonicAcOffTimerOffset = 2;
86 const uint8_t kPanasonicAcTimeSize = 11; // Bits
87 const uint8_t kPanasonicAcTimeOverflowSize = 3; // Bits
88 const uint16_t kPanasonicAcTimeMax = 23 * 60 + 59; // Mins since midnight.
89 const uint16_t kPanasonicAcTimeSpecial = 0x600;
90
91 const uint8_t kPanasonicAcIonFilterByte = 22; // Byte
92 const uint8_t kPanasonicAcIonFilterOffset = 0; // Bit
93
94 const uint8_t kPanasonicKnownGoodState[kPanasonicAcStateLength] = {
95 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02,
96 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
97 0x00, 0x0E, 0xE0, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00};
98
100 class IRPanasonicAc {
101 public:
102 explicit IRPanasonicAc(const uint16_t pin, const bool inverted = false,
103 const bool use_modulation = true);
104 void stateReset(void);
105 #if SEND_PANASONIC_AC
106 void send(const uint16_t repeat = kPanasonicAcDefaultRepeat);
111 int8_t calibrate(void) { return _irsend.calibrate(); }
112 #endif // SEND_PANASONIC_AC
113 void begin(void);
114 void on(void);
115 void off(void);
116 void setPower(const bool on);
117 bool getPower(void);
118 void setTemp(const uint8_t temp, const bool remember = true);
119 uint8_t getTemp(void);
120 void setFan(const uint8_t fan);
121 uint8_t getFan(void);
122 void setMode(const uint8_t mode);
123 uint8_t getMode(void);
124 void setRaw(const uint8_t state[]);
125 uint8_t *getRaw(void);
126 static bool validChecksum(const uint8_t *state,
127 const uint16_t length = kPanasonicAcStateLength);
128 static uint8_t calcChecksum(const uint8_t *state,
129 const uint16_t length = kPanasonicAcStateLength);
130 void setQuiet(const bool on);
131 bool getQuiet(void);
132 void setPowerful(const bool on);
133 bool getPowerful(void);
134 void setIon(const bool on);
135 bool getIon(void);
136 void setModel(const panasonic_ac_remote_model_t model);
137 panasonic_ac_remote_model_t getModel(void);
138 void setSwingVertical(const uint8_t elevation);
139 uint8_t getSwingVertical(void);
140 void setSwingHorizontal(const uint8_t direction);
141 uint8_t getSwingHorizontal(void);
142 static uint16_t encodeTime(const uint8_t hours, const uint8_t mins);
143 uint16_t getClock(void);
144 void setClock(const uint16_t mins_since_midnight);
145 uint16_t getOnTimer(void);
146 void setOnTimer(const uint16_t mins_since_midnight, const bool enable = true);
147 void cancelOnTimer(void);
148 bool isOnTimerEnabled(void);
149 uint16_t getOffTimer(void);
150 void setOffTimer(const uint16_t mins_since_midnight,
151 const bool enable = true);
152 void cancelOffTimer(void);
153 bool isOffTimerEnabled(void);
154 static uint8_t convertMode(const stdAc::opmode_t mode);
155 static uint8_t convertFan(const stdAc::fanspeed_t speed);
156 static uint8_t convertSwingV(const stdAc::swingv_t position);
157 static uint8_t convertSwingH(const stdAc::swingh_t position);
158 static stdAc::opmode_t toCommonMode(const uint8_t mode);
159 static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
160 static stdAc::swingv_t toCommonSwingV(const uint8_t pos);
161 static stdAc::swingh_t toCommonSwingH(const uint8_t pos);
162 stdAc::state_t toCommon(void);
163 String toString(void);
164 #ifndef UNIT_TEST
165
166 private:
167 IRsend _irsend;
168 #else // UNIT_TEST
169 IRsendTest _irsend;
171 #endif // UNIT_TEST
173 uint8_t remote_state[kPanasonicAcStateLength];
174 uint8_t _swingh;
175 uint8_t _temp;
176 void fixChecksum(const uint16_t length = kPanasonicAcStateLength);
177 static uint16_t _getTime(const uint8_t ptr[]);
178 static void _setTime(uint8_t * const ptr, const uint16_t mins_since_midnight,
179 const bool round_down);
180 };
181
183 union PanasonicAc32Protocol {
184 uint32_t raw;
185 struct {
186 // Byte 0
187 uint8_t :3;
188 uint8_t SwingH :1;
189 uint8_t SwingV :3;
190 uint8_t :1;
191 // Byte 1
192 uint8_t :8; // Always seems to be 0x36.
193 // Byte 2
194 uint8_t Temp :4;
195 uint8_t Fan :4;
196 // Byte 3
197 uint8_t Mode :3;
198 uint8_t PowerToggle :1; // 0 means toggle, 1 = keep the same.
199 uint8_t :4;
200 };
201 };
202
203 const uint8_t kPanasonicAc32Fan = 1; // 0b001
204 const uint8_t kPanasonicAc32Cool = 2; // 0b010
205 const uint8_t kPanasonicAc32Dry = 3; // 0b011
206 const uint8_t kPanasonicAc32Heat = 4; // 0b010
207 const uint8_t kPanasonicAc32Auto = 6; // 0b110
208
209 const uint8_t kPanasonicAc32FanMin = 2;
210 const uint8_t kPanasonicAc32FanLow = 3;
211 const uint8_t kPanasonicAc32FanMed = 4;
212 const uint8_t kPanasonicAc32FanHigh = 5;
213 const uint8_t kPanasonicAc32FanMax = 6;
214 const uint8_t kPanasonicAc32FanAuto = 0xF;
215 const uint8_t kPanasonicAc32SwingVAuto = 0x7; // 0b111
216 const uint32_t kPanasonicAc32KnownGood = 0x0AF136FC;
217
219 class IRPanasonicAc32 {
220 public:
221 explicit IRPanasonicAc32(const uint16_t pin, const bool inverted = false,
222 const bool use_modulation = true);
223 void stateReset(void);
224 #if SEND_PANASONIC_AC32
225 void send(const uint16_t repeat = kPanasonicAcDefaultRepeat);
230 int8_t calibrate(void) { return _irsend.calibrate(); }
231 #endif // SEND_PANASONIC_AC32
232 void begin(void);
233 void setPowerToggle(const bool on);
234 bool getPowerToggle(void) const;
235 void setTemp(const uint8_t temp);
236 uint8_t getTemp(void) const;
237 void setFan(const uint8_t fan);
238 uint8_t getFan(void) const;
239 void setMode(const uint8_t mode);
240 uint8_t getMode(void) const;
241 void setRaw(const uint32_t state);
242 uint32_t getRaw(void) const;
243 void setSwingVertical(const uint8_t pos);
244 uint8_t getSwingVertical(void) const;
245 void setSwingHorizontal(const bool on);
246 bool getSwingHorizontal(void) const;
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 stdAc::opmode_t toCommonMode(const uint8_t mode);
251 static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
252 static stdAc::swingv_t toCommonSwingV(const uint8_t pos);
253 stdAc::state_t toCommon(const stdAc::state_t *prev = NULL) const;
254 String toString(void) const;
255 #ifndef UNIT_TEST
256
257 private:
258 IRsend _irsend;
259 #else // UNIT_TEST
260 IRsendTest _irsend;
262 #endif // UNIT_TEST
264 PanasonicAc32Protocol _;
265 };
266
267 #endif // IR_PANASONIC_H_
kPanasonicAcFanAuto
const uint8_t kPanasonicAcFanAuto
Definition: ir_Panasonic.h:57
IRPanasonicAc::_getTime
static uint16_t _getTime(const uint8_t ptr[])
Get the time from a given pointer location.
Definition: ir_Panasonic.cpp:538
IRPanasonicAc
Class for handling detailed Panasonic A/C messages.
Definition: ir_Panasonic.h:100
IRPanasonicAc32::convertSwingV
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a standard A/C vertical swing into its native setting.
Definition: ir_Panasonic.cpp:1262
IRPanasonicAc::getTemp
uint8_t getTemp(void)
Get the current temperature setting.
Definition: ir_Panasonic.cpp:383
kPanasonicAcIonFilterOffset
const uint8_t kPanasonicAcIonFilterOffset
Definition: ir_Panasonic.h:92
kPanasonicAcAuto
const uint8_t kPanasonicAcAuto
Definition: ir_Panasonic.h:49
kPanasonicAcTimeSize
const uint8_t kPanasonicAcTimeSize
Definition: ir_Panasonic.h:86
IRPanasonicAc32::setTemp
void setTemp(const uint8_t temp)
Set the desired temperature.
Definition: ir_Panasonic.cpp:1123
IRPanasonicAc::setRaw
void setRaw(const uint8_t state[])
Set the internal state from a valid code for this protocol.
Definition: ir_Panasonic.cpp:320
IRPanasonicAc32::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Panasonic.h:230
PanasonicAc32Protocol
Native representation of a Panasonic 32-bit A/C message.
Definition: ir_Panasonic.h:183
IRPanasonicAc32::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Panasonic.cpp:1142
kPanasonicAcSwingHRight
const uint8_t kPanasonicAcSwingHRight
Definition: ir_Panasonic.h:80
stdAc::swingv_t
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:70
kPanasonicAc32FanMin
const uint8_t kPanasonicAc32FanMin
Definition: ir_Panasonic.h:209
kPanasonicAcFanMin
const uint8_t kPanasonicAcFanMin
Definition: ir_Panasonic.h:54
IRPanasonicAc::getOffTimer
uint16_t getOffTimer(void)
Get the Off Timer time value.
Definition: ir_Panasonic.cpp:599
kPanasonicAcQuietOffset
const uint8_t kPanasonicAcQuietOffset
Definition: ir_Panasonic.h:65
kPanasonicAc32FanHigh
const uint8_t kPanasonicAc32FanHigh
Definition: ir_Panasonic.h:212
kPanasonicAcOffTimerOffset
const uint8_t kPanasonicAcOffTimerOffset
Definition: ir_Panasonic.h:85
kPanasonicAc32FanMed
const uint8_t kPanasonicAc32FanMed
Definition: ir_Panasonic.h:211
kPanasonicAcTolerance
const uint16_t kPanasonicAcTolerance
Definition: ir_Panasonic.h:47
kPanasonicAc32FanAuto
const uint8_t kPanasonicAc32FanAuto
Definition: ir_Panasonic.h:214
stdAc::fanspeed_t
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
kPanasonicAcExcess
const uint16_t kPanasonicAcExcess
Definition: ir_Panasonic.h:45
IRPanasonicAc::_swingh
uint8_t _swingh
Definition: ir_Panasonic.h:174
PanasonicAc32Protocol::SwingV
uint8_t SwingV
Definition: ir_Panasonic.h:189
IRPanasonicAc::convertSwingV
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a standard A/C vertical swing into its native setting.
Definition: ir_Panasonic.cpp:682
IRPanasonicAc32::toString
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Panasonic.cpp:1275
kPanasonicAcPowerfulOffset
const uint8_t kPanasonicAcPowerfulOffset
Definition: ir_Panasonic.h:66
IRPanasonicAc32::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Panasonic.cpp:1218
IRPanasonicAc32::toCommon
stdAc::state_t toCommon(const stdAc::state_t *prev=NULL) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Panasonic.cpp:1307
IRPanasonicAc::encodeTime
static uint16_t encodeTime(const uint8_t hours, const uint8_t mins)
Convert standard (military/24hr) time to nr. of minutes since midnight.
Definition: ir_Panasonic.cpp:530
kPanasonicAcTimeOverflowSize
const uint8_t kPanasonicAcTimeOverflowSize
Definition: ir_Panasonic.h:87
kPanasonicAcFanMed
const uint8_t kPanasonicAcFanMed
Definition: ir_Panasonic.h:55
IRsend.h
IRPanasonicAc::setFan
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Panasonic.cpp:455
IRPanasonicAc::getFan
uint8_t getFan(void)
Get the current fan speed setting.
Definition: ir_Panasonic.cpp:470
IRPanasonicAc::setQuiet
void setQuiet(const bool on)
Set the Quiet setting of the A/C.
Definition: ir_Panasonic.cpp:489
kPanasonicAc32Heat
const uint8_t kPanasonicAc32Heat
Definition: ir_Panasonic.h:206
IRPanasonicAc::_temp
uint8_t _temp
Definition: ir_Panasonic.h:175
IRPanasonicAc32::setRaw
void setRaw(const uint32_t state)
Set the internal state from a valid code for this protocol.
Definition: ir_Panasonic.cpp:1108
IRsend
Class for sending all basic IR protocols.
Definition: IRsend.h:187
IRsend::calibrate
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
kPanasonicAc32SwingVAuto
const uint8_t kPanasonicAc32SwingVAuto
Definition: ir_Panasonic.h:215
PanasonicAc32Protocol::PowerToggle
uint8_t PowerToggle
Definition: ir_Panasonic.h:198
IRPanasonicAc32::setPowerToggle
void setPowerToggle(const bool on)
Set the Power Toggle setting of the A/C.
Definition: ir_Panasonic.cpp:1115
IRPanasonicAc::setSwingVertical
void setSwingVertical(const uint8_t elevation)
Control the vertical swing setting.
Definition: ir_Panasonic.cpp:409
String
std::string String
Definition: IRremoteESP8266.h:1199
IRPanasonicAc::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Panasonic.cpp:723
IRPanasonicAc::setIon
void setIon(const bool on)
Set the Ion (filter) setting of the A/C.
Definition: ir_Panasonic.cpp:646
kPanasonicAcPowerfulCkpOffset
const uint8_t kPanasonicAcPowerfulCkpOffset
Definition: ir_Panasonic.h:69
kPanasonicAcSwingHAuto
const uint8_t kPanasonicAcSwingHAuto
Definition: ir_Panasonic.h:82
kPanasonicAc32FanLow
const uint8_t kPanasonicAc32FanLow
Definition: ir_Panasonic.h:210
kPanasonicAcMinTemp
const uint8_t kPanasonicAcMinTemp
Definition: ir_Panasonic.h:62
IRPanasonicAc32::setSwingHorizontal
void setSwingHorizontal(const bool on)
Control the horizontal swing setting.
Definition: ir_Panasonic.cpp:1235
kPanasonicAcPowerOffset
const uint8_t kPanasonicAcPowerOffset
Definition: ir_Panasonic.h:59
kPanasonicAcHeat
const uint8_t kPanasonicAcHeat
Definition: ir_Panasonic.h:52
IRPanasonicAc::send
void send(const uint16_t repeat=kPanasonicAcDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Panasonic.cpp:237
IRPanasonicAc32::getSwingHorizontal
bool getSwingHorizontal(void) const
Get the current horizontal swing setting.
Definition: ir_Panasonic.cpp:1231
PanasonicAc32Protocol::Fan
uint8_t Fan
Definition: ir_Panasonic.h:195
IRPanasonicAc::getClock
uint16_t getClock(void)
Get the current clock time value.
Definition: ir_Panasonic.cpp:548
IRPanasonicAc::getPower
bool getPower(void)
Get the A/C power state of the remote.
Definition: ir_Panasonic.cpp:342
IRPanasonicAc::getQuiet
bool getQuiet(void)
Get the Quiet setting of the A/C.
Definition: ir_Panasonic.cpp:477
kPanasonicAc32KnownGood
const uint32_t kPanasonicAc32KnownGood
Cool, Auto, 16C.
Definition: ir_Panasonic.h:216
IRPanasonicAc32::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Panasonic.cpp:1171
panasonic_ac_remote_model_t
panasonic_ac_remote_model_t
Panasonic A/C model numbers.
Definition: IRsend.h:145
IRremoteESP8266.h
stdAc::swingh_t
swingh_t
Common A/C settings for Horizontal Swing.
Definition: IRsend.h:83
IRPanasonicAc::setOffTimer
void setOffTimer(const uint16_t mins_since_midnight, const bool enable=true)
Set/Enable the Off Timer.
Definition: ir_Panasonic.cpp:609
IRPanasonicAc::toCommon
stdAc::state_t toCommon(void)
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Panasonic.cpp:760
IRPanasonicAc::calcChecksum
static uint8_t calcChecksum(const uint8_t *state, const uint16_t length=kPanasonicAcStateLength)
Calculate the checksum for a given state.
Definition: ir_Panasonic.cpp:223
IRPanasonicAc::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Panasonic.cpp:655
kPanasonicAcChecksumInit
const uint8_t kPanasonicAcChecksumInit
Definition: ir_Panasonic.h:83
IRPanasonicAc::_setTime
static void _setTime(uint8_t *const ptr, const uint16_t mins_since_midnight, const bool round_down)
Set the time at a given pointer location.
Definition: ir_Panasonic.cpp:555
IRPanasonicAc::getSwingVertical
uint8_t getSwingVertical(void)
Get the current vertical swing setting.
Definition: ir_Panasonic.cpp:403
kPanasonicAcDefaultRepeat
const uint16_t kPanasonicAcDefaultRepeat
Definition: IRremoteESP8266.h:1050
PanasonicAc32Protocol::Temp
uint8_t Temp
Definition: ir_Panasonic.h:194
kPanasonicAcSwingHFullRight
const uint8_t kPanasonicAcSwingHFullRight
Definition: ir_Panasonic.h:81
kPanasonicAc32Auto
const uint8_t kPanasonicAc32Auto
Definition: ir_Panasonic.h:207
kPanasonicAcSwingHLeft
const uint8_t kPanasonicAcSwingHLeft
Definition: ir_Panasonic.h:79
IRPanasonicAc::getPowerful
bool getPowerful(void)
Get the Powerful (Turbo) setting of the A/C.
Definition: ir_Panasonic.cpp:502
IRPanasonicAc::setSwingHorizontal
void setSwingHorizontal(const uint8_t direction)
Control the horizontal swing setting.
Definition: ir_Panasonic.cpp:426
IRPanasonicAc::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Panasonic.cpp:313
IRPanasonicAc32::_
PanasonicAc32Protocol _
The state in code form.
Definition: ir_Panasonic.h:264
kPanasonicAcStateLength
const uint16_t kPanasonicAcStateLength
Definition: IRremoteESP8266.h:1046
IRPanasonicAc32::getTemp
uint8_t getTemp(void) const
Get the current desired temperature setting.
Definition: ir_Panasonic.cpp:1131
kPanasonicAcSwingHMiddle
const uint8_t kPanasonicAcSwingHMiddle
Definition: ir_Panasonic.h:77
IRPanasonicAc32::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Panasonic.cpp:1158
kPanasonicAcCool
const uint8_t kPanasonicAcCool
Definition: ir_Panasonic.h:51
IRPanasonicAc32::getSwingVertical
uint8_t getSwingVertical(void) const
Get the current vertical swing setting.
Definition: ir_Panasonic.cpp:1239
IRPanasonicAc32::IRPanasonicAc32
IRPanasonicAc32(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Panasonic.cpp:1087
kPanasonicFreq
const uint16_t kPanasonicFreq
Definition: ir_Panasonic.h:44
IRPanasonicAc32::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_Panasonic.h:258
IRPanasonicAc::toCommonSwingH
static stdAc::swingh_t toCommonSwingH(const uint8_t pos)
Convert a native horizontal swing postion to it's common equivalent.
Definition: ir_Panasonic.cpp:737
kPanasonicAc32Fan
const uint8_t kPanasonicAc32Fan
Definition: ir_Panasonic.h:203
IRPanasonicAc::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_Panasonic.h:167
IRPanasonicAc32::setSwingVertical
void setSwingVertical(const uint8_t pos)
Control the vertical swing setting.
Definition: ir_Panasonic.cpp:1243
IRPanasonicAc::setOnTimer
void setOnTimer(const uint16_t mins_since_midnight, const bool enable=true)
Set/Enable the On Timer.
Definition: ir_Panasonic.cpp:580
IRPanasonicAc::on
void on(void)
Change the power setting to On.
Definition: ir_Panasonic.cpp:347
IRPanasonicAc::IRPanasonicAc
IRPanasonicAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Panasonic.cpp:195
IRPanasonicAc::toString
String toString(void)
Convert the internal state into a human readable string.
Definition: ir_Panasonic.cpp:786
PanasonicAc32Protocol::Mode
uint8_t Mode
Definition: ir_Panasonic.h:197
kPanasonicAc32FanMax
const uint8_t kPanasonicAc32FanMax
Definition: ir_Panasonic.h:213
kPanasonicAcQuietCkpOffset
const uint8_t kPanasonicAcQuietCkpOffset
Definition: ir_Panasonic.h:68
kPanasonicKnownGoodState
const uint8_t kPanasonicKnownGoodState[kPanasonicAcStateLength]
Definition: ir_Panasonic.h:94
kPanasonicAcSwingVAuto
const uint8_t kPanasonicAcSwingVAuto
Definition: ir_Panasonic.h:75
IRPanasonicAc32::send
void send(const uint16_t repeat=kPanasonicAcDefaultRepeat)
Send the current internal state as IR messages.
Definition: ir_Panasonic.cpp:1094
kPanasonicAcSwingVHigh
const uint8_t kPanasonicAcSwingVHigh
Definition: ir_Panasonic.h:71
IRPanasonicAc::isOnTimerEnabled
bool isOnTimerEnabled(void)
Check if the On Timer is Enabled.
Definition: ir_Panasonic.cpp:593
IRPanasonicAc::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Panasonic.cpp:207
kPanasonicAc32Dry
const uint8_t kPanasonicAc32Dry
Definition: ir_Panasonic.h:205
IRPanasonicAc::fixChecksum
void fixChecksum(const uint16_t length=kPanasonicAcStateLength)
Calculate and set the checksum values for the internal state.
Definition: ir_Panasonic.cpp:230
IRPanasonicAc32::setFan
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Panasonic.cpp:1183
IRPanasonicAc::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Panasonic.h:111
IRPanasonicAc::setPower
void setPower(const bool on)
Control the power state of the A/C unit.
Definition: ir_Panasonic.cpp:334
IRPanasonicAc32::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Panasonic.cpp:1100
kPanasonicAcTempOffset
const uint8_t kPanasonicAcTempOffset
Definition: ir_Panasonic.h:60
IRPanasonicAc::setClock
void setClock(const uint16_t mins_since_midnight)
Set the current clock time value.
Definition: ir_Panasonic.cpp:569
kPanasonicAcTimeSpecial
const uint16_t kPanasonicAcTimeSpecial
Definition: ir_Panasonic.h:89
IRPanasonicAc::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Panasonic.cpp:360
IRPanasonicAc32::toCommonSwingV
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_Panasonic.cpp:1255
kPanasonicAcSwingVLow
const uint8_t kPanasonicAcSwingVLow
Definition: ir_Panasonic.h:73
IRPanasonicAc::cancelOnTimer
void cancelOnTimer(void)
Cancel the On Timer.
Definition: ir_Panasonic.cpp:589
IRPanasonicAc32::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Panasonic.cpp:1204
IRPanasonicAc::getSwingHorizontal
uint8_t getSwingHorizontal(void)
Get the current horizontal swing setting.
Definition: ir_Panasonic.cpp:420
kPanasonicAcFan
const uint8_t kPanasonicAcFan
Definition: ir_Panasonic.h:53
IRPanasonicAc::off
void off(void)
Change the power setting to Off.
Definition: ir_Panasonic.cpp:350
kPanasonicAcDry
const uint8_t kPanasonicAcDry
Definition: ir_Panasonic.h:50
IRPanasonicAc32
Class for handling detailed Panasonic 32bit A/C messages.
Definition: ir_Panasonic.h:219
IRPanasonicAc::remote_state
uint8_t remote_state[kPanasonicAcStateLength]
The state in code form.
Definition: ir_Panasonic.h:173
IRPanasonicAc::cancelOffTimer
void cancelOffTimer(void)
Cancel the Off Timer.
Definition: ir_Panasonic.cpp:624
kPanasonicAcIonFilterByte
const uint8_t kPanasonicAcIonFilterByte
Definition: ir_Panasonic.h:91
IRPanasonicAc::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Panasonic.cpp:668
kPanasonicAcSwingVMiddle
const uint8_t kPanasonicAcSwingVMiddle
Definition: ir_Panasonic.h:72
IRPanasonicAc::validChecksum
static bool validChecksum(const uint8_t *state, const uint16_t length=kPanasonicAcStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Panasonic.cpp:213
kPanasonicAcFanDelta
const uint8_t kPanasonicAcFanDelta
Definition: ir_Panasonic.h:58
kPanasonicAcSwingVHighest
const uint8_t kPanasonicAcSwingVHighest
Definition: ir_Panasonic.h:70
kPanasonicAc32Cool
const uint8_t kPanasonicAc32Cool
Definition: ir_Panasonic.h:204
IRPanasonicAc::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Panasonic.cpp:200
kPanasonicAcTempSize
const uint8_t kPanasonicAcTempSize
Definition: ir_Panasonic.h:61
IRPanasonicAc::getMode
uint8_t getMode(void)
Get the operating mode setting of the A/C.
Definition: ir_Panasonic.cpp:354
IRPanasonicAc::setPowerful
void setPowerful(const bool on)
Set the Powerful (Turbo) setting of the A/C.
Definition: ir_Panasonic.cpp:514
kPanasonicAcFanModeTemp
const uint8_t kPanasonicAcFanModeTemp
Definition: ir_Panasonic.h:64
IRPanasonicAc32::getPowerToggle
bool getPowerToggle(void) const
Get the Power Toggle setting of the A/C.
Definition: ir_Panasonic.cpp:1119
kPanasonicAcFanMax
const uint8_t kPanasonicAcFanMax
Definition: ir_Panasonic.h:56
IRPanasonicAc::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Panasonic.cpp:710
IRPanasonicAc32::getRaw
uint32_t getRaw(void) const
Get a copy of the internal state/code for this protocol.
Definition: ir_Panasonic.cpp:1104
IRPanasonicAc::isOffTimerEnabled
bool isOffTimerEnabled(void)
Check if the Off Timer is Enabled.
Definition: ir_Panasonic.cpp:628
kPanasonicAcTimeMax
const uint16_t kPanasonicAcTimeMax
Definition: ir_Panasonic.h:88
kPanasonicAcSwingHFullLeft
const uint8_t kPanasonicAcSwingHFullLeft
Definition: ir_Panasonic.h:78
IRPanasonicAc::getModel
panasonic_ac_remote_model_t getModel(void)
Get/Detect the model of the A/C.
Definition: ir_Panasonic.cpp:294
IRPanasonicAc::getIon
bool getIon(void)
Get the Ion (filter) setting of the A/C.
Definition: ir_Panasonic.cpp:634
PanasonicAc32Protocol::raw
uint32_t raw
The state in IR code form.
Definition: ir_Panasonic.h:184
IRPanasonicAc32::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Panasonic.cpp:1111
IRPanasonicAc::getOnTimer
uint16_t getOnTimer(void)
Get the On Timer time value.
Definition: ir_Panasonic.cpp:575
stdAc::state_t
Structure to hold a common A/C state.
Definition: IRsend.h:97
IRPanasonicAc::setModel
void setModel(const panasonic_ac_remote_model_t model)
Set the model of the A/C to emulate.
Definition: ir_Panasonic.cpp:244
PanasonicAc32Protocol::SwingH
uint8_t SwingH
Definition: ir_Panasonic.h:188
IRPanasonicAc32::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Panasonic.cpp:1137
kPanasonicAcMaxTemp
const uint8_t kPanasonicAcMaxTemp
Definition: ir_Panasonic.h:63
IRPanasonicAc::convertSwingH
static uint8_t convertSwingH(const stdAc::swingh_t position)
Convert a standard A/C horizontal swing into its native setting.
Definition: ir_Panasonic.cpp:696
IRPanasonicAc::setTemp
void setTemp(const uint8_t temp, const bool remember=true)
Set the temperature.
Definition: ir_Panasonic.cpp:392
kPanasonicAcSwingVLowest
const uint8_t kPanasonicAcSwingVLowest
Definition: ir_Panasonic.h:74
kPanasonicAcOnTimerOffset
const uint8_t kPanasonicAcOnTimerOffset
Definition: ir_Panasonic.h:84
IRPanasonicAc::toCommonSwingV
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_Panasonic.cpp:751
IRPanasonicAc32::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Panasonic.cpp:1199
stdAc::opmode_t
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46