IRremoteESP8266
ir_Samsung.h
Go to the documentation of this file.
1 // Copyright 2018-2021 David Conran
11 
12 // Supports:
13 // Brand: Samsung, Model: UA55H6300 TV (SAMSUNG)
14 // Brand: Samsung, Model: BN59-01178B TV remote (SAMSUNG)
15 // Brand: Samsung, Model: DB63-03556X003 remote
16 // Brand: Samsung, Model: DB93-16761C remote
17 // Brand: Samsung, Model: IEC-R03 remote
18 // Brand: Samsung, Model: AK59-00167A Bluray remote (SAMSUNG36)
19 // Brand: Samsung, Model: AH59-02692E Soundbar remote (SAMSUNG36)
20 // Brand: Samsung, Model: HW-J551 Soundbar (SAMSUNG36)
21 // Brand: Samsung, Model: AR09FSSDAWKNFA A/C (SAMSUNG_AC)
22 // Brand: Samsung, Model: AR09HSFSBWKN A/C (SAMSUNG_AC)
23 // Brand: Samsung, Model: AR12KSFPEWQNET A/C (SAMSUNG_AC)
24 // Brand: Samsung, Model: AR12HSSDBWKNEU A/C (SAMSUNG_AC)
25 // Brand: Samsung, Model: AR12NXCXAWKXEU A/C (SAMSUNG_AC)
26 // Brand: Samsung, Model: AR12TXEAAWKNEU A/C (SAMSUNG_AC)
27 // Brand: Samsung, Model: DB93-14195A remote (SAMSUNG_AC)
28 // Brand: Samsung, Model: DB96-24901C remote (SAMSUNG_AC)
29 
30 #ifndef IR_SAMSUNG_H_
31 #define IR_SAMSUNG_H_
32 
33 #define __STDC_LIMIT_MACROS
34 #include <stdint.h>
35 #ifndef UNIT_TEST
36 #include <Arduino.h>
37 #endif
38 #include "IRremoteESP8266.h"
39 #include "IRsend.h"
40 #ifdef UNIT_TEST
41 #include "IRsend_test.h"
42 #endif
43 
47  struct { // Standard message map
48  // Byte 0
49  uint8_t :8;
50  // Byte 1
51  uint8_t :4;
52  uint8_t :4; // Sum1Lower
53  // Byte 2
54  uint8_t :4; // Sum1Upper
55  uint8_t :4;
56  // Byte 3
57  uint8_t :8;
58  // Byte 4
59  uint8_t :8;
60  // Byte 5
61  uint8_t :4;
62  uint8_t Sleep5 :1;
63  uint8_t Quiet :1;
64  uint8_t :2;
65  // Byte 6
66  uint8_t :4;
67  uint8_t Power1 :2;
68  uint8_t :2;
69  // Byte 7
70  uint8_t :8;
71  // Byte 8
72  uint8_t :4;
73  uint8_t :4; // Sum2Lower
74  // Byte 9
75  uint8_t :4; // Sum1Upper
76  uint8_t Swing :3;
77  uint8_t :1;
78  // Byte 10
79  uint8_t :1;
80  uint8_t FanSpecial :3; // Powerful, Breeze/WindFree, Econo
81  uint8_t Display :1;
82  uint8_t :2;
83  uint8_t CleanToggle10 :1;
84  // Byte 11
85  uint8_t Ion :1;
86  uint8_t CleanToggle11 :1;
87  uint8_t :2;
88  uint8_t Temp :4;
89  // Byte 12
90  uint8_t :1;
91  uint8_t Fan :3;
92  uint8_t Mode :3;
93  uint8_t :1;
94  // Byte 13
95  uint8_t :2;
96  uint8_t BeepToggle :1;
97  uint8_t :1;
98  uint8_t Power2 :2;
99  uint8_t :2;
100  };
101  struct { // Extended message map
102  // 1st Section
103  // Byte 0
104  uint8_t :8;
105  // Byte 1
106  uint8_t :4;
107  uint8_t Sum1Lower :4;
108  // Byte 2
109  uint8_t Sum1Upper :4;
110  uint8_t :4;
111  // Byte 3
112  uint8_t :8;
113  // Byte 4
114  uint8_t :8;
115  // Byte 5
116  uint8_t :8;
117  // Byte 6
118  uint8_t :8;
119  // 2nd Section
120  // Byte 7
121  uint8_t :8;
122  // Byte 8
123  uint8_t :4;
124  uint8_t Sum2Lower :4;
125  // Byte 9
126  uint8_t Sum2Upper :4;
127  uint8_t OffTimeMins :3; // In units of 10's of mins
128  uint8_t OffTimeHrs1 :1; // LSB of the number of hours.
129  // Byte 10
130  uint8_t OffTimeHrs2 :4; // MSBs of the number of hours.
131  uint8_t OnTimeMins :3; // In units of 10's of mins
132  uint8_t OnTimeHrs1 :1; // LSB of the number of hours.
133  // Byte 11
134  uint8_t OnTimeHrs2 :4; // MSBs of the number of hours.
135  uint8_t :4;
136  // Byte 12
137  uint8_t OffTimeDay :1;
138  uint8_t OnTimerEnable :1;
139  uint8_t OffTimerEnable :1;
140  uint8_t Sleep12 :1;
141  uint8_t OnTimeDay :1;
142  uint8_t :3;
143  // Byte 13
144  uint8_t :8;
145  // 3rd Section
146  // Byte 14
147  uint8_t :8;
148  // Byte 15
149  uint8_t :4;
150  uint8_t Sum3Lower :4;
151  // Byte 16
152  uint8_t Sum3Upper :4;
153  uint8_t :4;
154  // Byte 17
155  uint8_t :8;
156  // Byte 18
157  uint8_t :8;
158  // Byte 19
159  uint8_t :8;
160  // Byte 20
161  uint8_t :8;
162  };
163 };
164 
165 // Constants
166 const uint8_t kSamsungAcMinTemp = 16; // C Mask 0b11110000
167 const uint8_t kSamsungAcMaxTemp = 30; // C Mask 0b11110000
168 const uint8_t kSamsungAcAutoTemp = 25; // C Mask 0b11110000
169 const uint8_t kSamsungAcAuto = 0;
170 const uint8_t kSamsungAcCool = 1;
171 const uint8_t kSamsungAcDry = 2;
172 const uint8_t kSamsungAcFan = 3;
173 const uint8_t kSamsungAcHeat = 4;
174 const uint8_t kSamsungAcFanAuto = 0;
175 const uint8_t kSamsungAcFanLow = 2;
176 const uint8_t kSamsungAcFanMed = 4;
177 const uint8_t kSamsungAcFanHigh = 5;
178 const uint8_t kSamsungAcFanAuto2 = 6;
179 const uint8_t kSamsungAcFanTurbo = 7;
180 const uint16_t kSamsungAcSectionLength = 7;
181 const uint64_t kSamsungAcPowerSection = 0x1D20F00000000;
182 
183 // Classes
185 class IRSamsungAc {
186  public:
187  explicit IRSamsungAc(const uint16_t pin, const bool inverted = false,
188  const bool use_modulation = true);
189  void stateReset(const bool extended = true, const bool initialPower = true);
190 #if SEND_SAMSUNG_AC
191  void send(const uint16_t repeat = kSamsungAcDefaultRepeat);
192  void sendExtended(const uint16_t repeat = kSamsungAcDefaultRepeat);
193  void sendOn(const uint16_t repeat = kSamsungAcDefaultRepeat);
194  void sendOff(const uint16_t repeat = kSamsungAcDefaultRepeat);
199  int8_t calibrate(void) { return _irsend.calibrate(); }
200 #endif // SEND_SAMSUNG_AC
201  void begin(void);
202  void on(void);
203  void off(void);
204  void setPower(const bool on);
205  bool getPower(void) const;
206  void setTemp(const uint8_t temp);
207  uint8_t getTemp(void) const;
208  void setFan(const uint8_t speed);
209  uint8_t getFan(void) const;
210  void setMode(const uint8_t mode);
211  uint8_t getMode(void) const;
212  void setSwing(const bool on);
213  bool getSwing(void) const;
214  void setSwingH(const bool on);
215  bool getSwingH(void) const;
216  void setBeep(const bool on);
217  bool getBeep(void) const;
218  void setClean(const bool on);
219  bool getClean(void) const;
220  void setQuiet(const bool on);
221  bool getQuiet(void) const;
222  void setPowerful(const bool on);
223  bool getPowerful(void) const;
224  void setBreeze(const bool on);
225  bool getBreeze(void) const;
226  void setEcono(const bool on);
227  bool getEcono(void) const;
228  void setDisplay(const bool on);
229  bool getDisplay(void) const;
230  void setIon(const bool on);
231  bool getIon(void) const;
232  uint16_t getOnTimer(void) const;
233  void setOnTimer(const uint16_t nr_of_mins);
234  uint16_t getOffTimer(void) const;
235  void setOffTimer(const uint16_t nr_of_mins);
236  uint16_t getSleepTimer(void) const;
237  void setSleepTimer(const uint16_t nr_of_mins);
238  uint8_t* getRaw(void);
239  void setRaw(const uint8_t new_code[],
240  const uint16_t length = kSamsungAcStateLength);
241  static uint8_t calcSectionChecksum(const uint8_t *section);
242  static uint8_t getSectionChecksum(const uint8_t *section);
243  static bool validChecksum(const uint8_t state[],
244  const uint16_t length = kSamsungAcStateLength);
245  static uint8_t convertMode(const stdAc::opmode_t mode);
246  static uint8_t convertFan(const stdAc::fanspeed_t speed);
247  static stdAc::opmode_t toCommonMode(const uint8_t mode);
248  static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
249  stdAc::state_t toCommon(void) const;
250  String toString(void) const;
251 #ifndef UNIT_TEST
252 
253  private:
255 #else // UNIT_TEST
256  IRsendTest _irsend;
258 #endif // UNIT_TEST
265  bool _Sleep;
267  uint16_t _OnTimer;
268  uint16_t _OffTimer;
269  uint16_t _lastOnTimer;
270  uint16_t _lastOffTimer;
271  void checksum(void);
272  uint16_t _getOnTimer(void) const;
273  uint16_t _getOffTimer(void) const;
274  void _setOnTimer(void);
275  void _setOffTimer(void);
276  void _setSleepTimer(void);
277 };
278 
279 #endif // IR_SAMSUNG_H_
SamsungProtocol::OffTimeHrs1
uint8_t OffTimeHrs1
Definition: ir_Samsung.h:128
IRSamsungAc::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Samsung.cpp:868
IRSamsungAc::getOnTimer
uint16_t getOnTimer(void) const
Get the On Timer setting of the A/C.
Definition: ir_Samsung.cpp:760
kSamsungAcDry
const uint8_t kSamsungAcDry
Definition: ir_Samsung.h:171
IRSamsungAc
Class for handling detailed Samsung A/C messages.
Definition: ir_Samsung.h:185
IRSamsungAc::_OnTimer
uint16_t _OnTimer
Definition: ir_Samsung.h:267
kSamsungAcCool
const uint8_t kSamsungAcCool
Definition: ir_Samsung.h:170
SamsungProtocol::OffTimerEnable
uint8_t OffTimerEnable
Definition: ir_Samsung.h:139
SamsungProtocol::Sum2Upper
uint8_t Sum2Upper
Definition: ir_Samsung.h:126
SamsungProtocol
Native representation of a Samsung A/C message.
Definition: ir_Samsung.h:45
IRSamsungAc::getSwingH
bool getSwingH(void) const
Get the horizontal swing setting of the A/C.
Definition: ir_Samsung.cpp:573
IRSamsungAc::getIon
bool getIon(void) const
Get the Ion (Filter) setting of the A/C.
Definition: ir_Samsung.cpp:702
IRSamsungAc::setQuiet
void setQuiet(const bool on)
Set the Quiet setting of the A/C.
Definition: ir_Samsung.cpp:621
IRSamsungAc::setSwingH
void setSwingH(const bool on)
Set the horizontal swing setting of the A/C.
Definition: ir_Samsung.cpp:583
kSamsungAcFanMed
const uint8_t kSamsungAcFanMed
Definition: ir_Samsung.h:176
kSamsungAcFanAuto2
const uint8_t kSamsungAcFanAuto2
Definition: ir_Samsung.h:178
IRSamsungAc::send
void send(const uint16_t repeat=kSamsungAcDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Samsung.cpp:374
kSamsungAcAuto
const uint8_t kSamsungAcAuto
Definition: ir_Samsung.h:169
IRSamsungAc::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_Samsung.h:254
IRSamsungAc::checksum
void checksum(void)
Update the checksum for the internal state.
Definition: ir_Samsung.cpp:357
IRSamsungAc::IRSamsungAc
IRSamsungAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Samsung.cpp:284
IRSamsungAc::getPowerful
bool getPowerful(void) const
Get the Powerful (Turbo) setting of the A/C.
Definition: ir_Samsung.cpp:632
kSamsungAcFanHigh
const uint8_t kSamsungAcFanHigh
Definition: ir_Samsung.h:177
IRSamsungAc::getClean
bool getClean(void) const
Get the Clean toggle setting of the A/C.
Definition: ir_Samsung.cpp:604
SamsungProtocol::Temp
uint8_t Temp
Definition: ir_Samsung.h:88
IRSamsungAc::setOffTimer
void setOffTimer(const uint16_t nr_of_mins)
Set the Off Timer value of the A/C.
Definition: ir_Samsung.cpp:794
stdAc::fanspeed_t
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
kSamsungAcFan
const uint8_t kSamsungAcFan
Definition: ir_Samsung.h:172
IRSamsungAc::setBreeze
void setBreeze(const bool on)
Closes the vanes over the fan outlet, to stop direct wind. Aka. WindFree.
Definition: ir_Samsung.cpp:661
SamsungProtocol::Swing
uint8_t Swing
Definition: ir_Samsung.h:76
SamsungProtocol::OffTimeHrs2
uint8_t OffTimeHrs2
Definition: ir_Samsung.h:130
IRSamsungAc::setOnTimer
void setOnTimer(const uint16_t nr_of_mins)
Set the On Timer value of the A/C.
Definition: ir_Samsung.cpp:783
IRSamsungAc::_Sleep
bool _Sleep
Definition: ir_Samsung.h:265
SamsungProtocol::Ion
uint8_t Ion
Definition: ir_Samsung.h:85
SamsungProtocol::OnTimeDay
uint8_t OnTimeDay
Definition: ir_Samsung.h:141
IRSamsungAc::sendExtended
void sendExtended(const uint16_t repeat=kSamsungAcDefaultRepeat)
Send the extended current internal state as an IR message.
Definition: ir_Samsung.cpp:388
SamsungProtocol::FanSpecial
uint8_t FanSpecial
Definition: ir_Samsung.h:80
kSamsungAcDefaultRepeat
const uint16_t kSamsungAcDefaultRepeat
Definition: IRremoteESP8266.h:1227
IRSamsungAc::getDisplay
bool getDisplay(void) const
Get the Display (Light/LED) setting of the A/C.
Definition: ir_Samsung.cpp:694
IRSamsungAc::stateReset
void stateReset(const bool extended=true, const bool initialPower=true)
Reset the internal state of the emulation.
Definition: ir_Samsung.cpp:294
IRSamsungAc::_
SamsungProtocol _
Definition: ir_Samsung.h:260
SamsungProtocol::BeepToggle
uint8_t BeepToggle
Definition: ir_Samsung.h:96
SamsungProtocol::OnTimeMins
uint8_t OnTimeMins
Definition: ir_Samsung.h:131
IRsend.h
IRSamsungAc::setSwing
void setSwing(const bool on)
Set the vertical swing setting of the A/C.
Definition: ir_Samsung.cpp:560
IRSamsungAc::getQuiet
bool getQuiet(void) const
Get the Quiet setting of the A/C.
Definition: ir_Samsung.cpp:617
SamsungProtocol::Sum3Upper
uint8_t Sum3Upper
Definition: ir_Samsung.h:152
kSamsungAcSectionLength
const uint16_t kSamsungAcSectionLength
Definition: ir_Samsung.h:180
IRSamsungAc::_getOffTimer
uint16_t _getOffTimer(void) const
Get the Off Timer setting of the A/C from a raw extended state.
Definition: ir_Samsung.cpp:731
IRSamsungAc::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Samsung.cpp:310
IRsend
Class for sending all basic IR protocols.
Definition: IRsend.h:209
IRSamsungAc::setIon
void setIon(const bool on)
Set the Ion (Filter) setting of the A/C.
Definition: ir_Samsung.cpp:706
IRsend::calibrate
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
SamsungProtocol::OffTimeMins
uint8_t OffTimeMins
Definition: ir_Samsung.h:127
IRSamsungAc::getTemp
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Samsung.cpp:494
IRSamsungAc::_lastOnTimer
uint16_t _lastOnTimer
Definition: ir_Samsung.h:269
IRSamsungAc::setRaw
void setRaw(const uint8_t new_code[], const uint16_t length=kSamsungAcStateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Samsung.cpp:451
SamsungProtocol::Sum1Lower
uint8_t Sum1Lower
Definition: ir_Samsung.h:107
String
std::string String
Definition: IRremoteESP8266.h:1373
IRSamsungAc::toString
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Samsung.cpp:894
IRSamsungAc::sendOff
void sendOff(const uint16_t repeat=kSamsungAcDefaultRepeat)
Send the special extended "Off" message as the library can't seem to reproduce this message automatic...
Definition: ir_Samsung.cpp:431
IRSamsungAc::getOffTimer
uint16_t getOffTimer(void) const
Get the Off Timer setting of the A/C.
Definition: ir_Samsung.cpp:765
IRSamsungAc::setSleepTimer
void setSleepTimer(const uint16_t nr_of_mins)
Set the Sleep Timer value of the A/C.
Definition: ir_Samsung.cpp:805
IRSamsungAc::on
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Samsung.cpp:467
IRSamsungAc::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Samsung.cpp:829
IRSamsungAc::_setSleepTimer
void _setSleepTimer(void)
Definition: ir_Samsung.cpp:751
kSamsungAcStateLength
const uint16_t kSamsungAcStateLength
Definition: IRremoteESP8266.h:1223
IRSamsungAc::validChecksum
static bool validChecksum(const uint8_t state[], const uint16_t length=kSamsungAcStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Samsung.cpp:343
IRSamsungAc::getBeep
bool getBeep(void) const
Get the Beep toggle setting of the A/C.
Definition: ir_Samsung.cpp:596
IRremoteESP8266.h
SamsungProtocol::Sum3Lower
uint8_t Sum3Lower
Definition: ir_Samsung.h:150
IRSamsungAc::setTemp
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Samsung.cpp:486
SamsungProtocol::OffTimeDay
uint8_t OffTimeDay
Definition: ir_Samsung.h:137
IRSamsungAc::getSleepTimer
uint16_t getSleepTimer(void) const
Get the Sleep Timer setting of the A/C.
Definition: ir_Samsung.cpp:772
kSamsungAcPowerSection
const uint64_t kSamsungAcPowerSection
Definition: ir_Samsung.h:181
IRSamsungAc::setPowerful
void setPowerful(const bool on)
Set the Powerful (Turbo) setting of the A/C.
Definition: ir_Samsung.cpp:639
SamsungProtocol::Sum2Lower
uint8_t Sum2Lower
Definition: ir_Samsung.h:124
kSamsungAcExtendedStateLength
const uint16_t kSamsungAcExtendedStateLength
Definition: IRremoteESP8266.h:1225
IRSamsungAc::_OffTimer
uint16_t _OffTimer
Definition: ir_Samsung.h:268
SamsungProtocol::Mode
uint8_t Mode
Definition: ir_Samsung.h:92
IRSamsungAc::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_Samsung.cpp:474
SamsungProtocol::Sum1Upper
uint8_t Sum1Upper
Definition: ir_Samsung.h:109
SamsungProtocol::Display
uint8_t Display
Definition: ir_Samsung.h:81
IRSamsungAc::setDisplay
void setDisplay(const bool on)
Set the Display (Light/LED) setting of the A/C.
Definition: ir_Samsung.cpp:698
IRSamsungAc::_lastSleep
bool _lastSleep
Definition: ir_Samsung.h:266
SamsungProtocol::Power2
uint8_t Power2
Definition: ir_Samsung.h:98
IRSamsungAc::_lastsentpowerstate
bool _lastsentpowerstate
Definition: ir_Samsung.h:262
kSamsungAcAutoTemp
const uint8_t kSamsungAcAutoTemp
Definition: ir_Samsung.h:168
IRSamsungAc::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Samsung.cpp:500
kSamsungAcFanLow
const uint8_t kSamsungAcFanLow
Definition: ir_Samsung.h:175
IRSamsungAc::setClean
void setClean(const bool on)
Set the Clean toggle setting of the A/C.
Definition: ir_Samsung.cpp:610
SamsungProtocol::CleanToggle11
uint8_t CleanToggle11
Definition: ir_Samsung.h:86
kSamsungAcHeat
const uint8_t kSamsungAcHeat
Definition: ir_Samsung.h:173
IRSamsungAc::setEcono
void setEcono(const bool on)
Set the current Economy (Eco) setting of the A/C.
Definition: ir_Samsung.cpp:681
IRSamsungAc::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Samsung.cpp:843
IRSamsungAc::sendOn
void sendOn(const uint16_t repeat=kSamsungAcDefaultRepeat)
Send the special extended "On" message as the library can't seem to reproduce this message automatica...
Definition: ir_Samsung.cpp:418
kSamsungAcFanAuto
const uint8_t kSamsungAcFanAuto
Definition: ir_Samsung.h:174
IRSamsungAc::setBeep
void setBeep(const bool on)
Set the Beep toggle setting of the A/C.
Definition: ir_Samsung.cpp:600
SamsungProtocol::Power1
uint8_t Power1
Definition: ir_Samsung.h:67
IRSamsungAc::_forceextended
bool _forceextended
Flag to know when we need to send an extended mesg.
Definition: ir_Samsung.h:261
SamsungProtocol::OnTimerEnable
uint8_t OnTimerEnable
Definition: ir_Samsung.h:138
IRSamsungAc::getSectionChecksum
static uint8_t getSectionChecksum(const uint8_t *section)
Get the existing checksum for a given state section.
Definition: ir_Samsung.cpp:316
IRSamsungAc::_getOnTimer
uint16_t _getOnTimer(void) const
Get the On Timer setting of the A/C from a raw extended state.
Definition: ir_Samsung.cpp:710
IRSamsungAc::_OnTimerEnable
bool _OnTimerEnable
Definition: ir_Samsung.h:263
IRSamsungAc::getSwing
bool getSwing(void) const
Get the vertical swing setting of the A/C.
Definition: ir_Samsung.cpp:550
SamsungProtocol::Sleep12
uint8_t Sleep12
Definition: ir_Samsung.h:140
IRSamsungAc::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Samsung.cpp:816
IRSamsungAc::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Samsung.h:199
SamsungProtocol::Fan
uint8_t Fan
Definition: ir_Samsung.h:91
IRSamsungAc::calcSectionChecksum
static uint8_t calcSectionChecksum(const uint8_t *section)
Calculate the checksum for a given state section.
Definition: ir_Samsung.cpp:325
IRSamsungAc::getEcono
bool getEcono(void) const
Get the current Economy (Eco) setting of the A/C.
Definition: ir_Samsung.cpp:674
SamsungProtocol::OnTimeHrs1
uint8_t OnTimeHrs1
Definition: ir_Samsung.h:132
IRSamsungAc::setFan
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Samsung.cpp:524
kSamsungAcMaxTemp
const uint8_t kSamsungAcMaxTemp
Definition: ir_Samsung.h:167
SamsungProtocol::Sleep5
uint8_t Sleep5
Definition: ir_Samsung.h:62
IRSamsungAc::_setOnTimer
void _setOnTimer(void)
Set the current On Timer value of the A/C into the raw extended state.
Definition: ir_Samsung.cpp:716
SamsungProtocol::CleanToggle10
uint8_t CleanToggle10
Definition: ir_Samsung.h:83
IRSamsungAc::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Samsung.cpp:470
IRSamsungAc::getBreeze
bool getBreeze(void) const
Are the vanes closed over the fan outlet, to stop direct wind? Aka. WindFree.
Definition: ir_Samsung.cpp:653
IRSamsungAc::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Samsung.cpp:856
IRSamsungAc::_lastOffTimer
uint16_t _lastOffTimer
Definition: ir_Samsung.h:270
IRSamsungAc::_OffTimerEnable
bool _OffTimerEnable
Definition: ir_Samsung.h:264
IRSamsungAc::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Samsung.cpp:480
SamsungProtocol::Quiet
uint8_t Quiet
Definition: ir_Samsung.h:63
IRSamsungAc::_setOffTimer
void _setOffTimer(void)
Set the current Off Timer value of the A/C into the raw extended state.
Definition: ir_Samsung.cpp:737
IRSamsungAc::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Samsung.cpp:443
SamsungProtocol::OnTimeHrs2
uint8_t OnTimeHrs2
Definition: ir_Samsung.h:134
kSamsungAcFanTurbo
const uint8_t kSamsungAcFanTurbo
Definition: ir_Samsung.h:179
stdAc::state_t
Structure to hold a common A/C state.
Definition: IRsend.h:97
IRSamsungAc::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Samsung.cpp:544
SamsungProtocol::raw
uint8_t raw[kSamsungAcExtendedStateLength]
State in code form.
Definition: ir_Samsung.h:46
kSamsungAcMinTemp
const uint8_t kSamsungAcMinTemp
Definition: ir_Samsung.h:166
IRSamsungAc::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Samsung.cpp:518
stdAc::opmode_t
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46