IRremoteESP8266
ir_Sanyo.h
Go to the documentation of this file.
1 // Copyright 2020-2021 David Conran
2 
17 
18 // Supports:
19 // Brand: Sanyo, Model: SA 8650B - disabled
20 // Brand: Sanyo, Model: LC7461 transmitter IC (SANYO_LC7461)
21 // Brand: Sanyo, Model: SAP-K121AHA A/C (SANYO_AC)
22 // Brand: Sanyo, Model: RCS-2HS4E remote (SANYO_AC)
23 // Brand: Sanyo, Model: SAP-K242AH A/C (SANYO_AC)
24 // Brand: Sanyo, Model: RCS-2S4E remote (SANYO_AC)
25 // Brand: Sanyo, Model: RCS-4MHVPIS4EE remote (SANYO_AC152)
26 // Brand: Sanyo, Model: SAP-KMRV124EHE A/C (SANYO_AC152)
27 
28 #ifndef IR_SANYO_H_
29 #define IR_SANYO_H_
30 
31 #define __STDC_LIMIT_MACROS
32 #include <stdint.h>
33 #ifdef ARDUINO
34 #include <Arduino.h>
35 #endif
36 #include "IRremoteESP8266.h"
37 #include "IRsend.h"
38 #ifdef UNIT_TEST
39 #include "IRsend_test.h"
40 #endif
41 
45  // Ref: https://docs.google.com/spreadsheets/d/1dYfLsnYvpjV-SgO8pdinpfuBIpSzm8Q1R5SabrLeskw/edit?usp=sharing
46  struct {
47  // Byte 0
48  uint8_t :8; // 0x6A (Fixed?)
49  // Byte 1
50  uint8_t Temp :5;
51  uint8_t :3;
52  // Byte 2
53  uint8_t SensorTemp :5;
54  uint8_t Sensor :1;
55  uint8_t Beep :1;
56  uint8_t :1;
57  // Byte 3
58  uint8_t OffHour :4;
59  uint8_t :4;
60  // Byte 4
61  uint8_t Fan :2;
62  uint8_t OffTimer :1;
63  uint8_t :1;
64  uint8_t Mode :3;
65  uint8_t :1;
66  // Byte 5
67  uint8_t SwingV :3;
68  uint8_t :3;
69  uint8_t Power :2;
70  // Byte 6
71  uint8_t :3;
72  uint8_t Sleep :1;
73  uint8_t :4;
74  // Byte 7
75  uint8_t :8;
76  // Byte 8
77  uint8_t Sum :8;
78  };
79 };
80 
81 // Constants
82 
83 const uint8_t kSanyoAcTempMin = 16;
84 const uint8_t kSanyoAcTempMax = 30;
85 const uint8_t kSanyoAcTempDelta = 4;
86 
87 const uint8_t kSanyoAcHourMax = 15;
88 
89 const uint8_t kSanyoAcHeat = 1;
90 const uint8_t kSanyoAcCool = 2;
91 const uint8_t kSanyoAcDry = 3;
92 const uint8_t kSanyoAcAuto = 4;
93 const uint8_t kSanyoAcFanAuto = 0;
94 const uint8_t kSanyoAcFanHigh = 1;
95 const uint8_t kSanyoAcFanLow = 2;
96 const uint8_t kSanyoAcFanMedium = 3;
97 
98 // const uint8_t kSanyoAcPowerStandby = 0b00; ///< Standby?
99 const uint8_t kSanyoAcPowerOff = 0b01;
100 const uint8_t kSanyoAcPowerOn = 0b10;
101 const uint8_t kSanyoAcSwingVAuto = 0;
102 const uint8_t kSanyoAcSwingVLowest = 2;
103 const uint8_t kSanyoAcSwingVLow = 3;
104 const uint8_t kSanyoAcSwingVLowerMiddle = 4;
105 const uint8_t kSanyoAcSwingVUpperMiddle = 5;
106 const uint8_t kSanyoAcSwingVHigh = 6;
107 const uint8_t kSanyoAcSwingVHighest = 7;
108 
109 // Classes
111 class IRSanyoAc {
112  public:
113  explicit IRSanyoAc(const uint16_t pin, const bool inverted = false,
114  const bool use_modulation = true);
115  void stateReset(void);
116 #if SEND_SANYO_AC
117  void send(const uint16_t repeat = kNoRepeat);
122  int8_t calibrate(void) { return _irsend.calibrate(); }
123 #endif // SEND_SANYO_AC
124  void begin(void);
125  void on(void);
126  void off(void);
127  void setPower(const bool on);
128  bool getPower(void) const;
129  void setTemp(const uint8_t degrees);
130  uint8_t getTemp(void) const;
131  void setSensorTemp(const uint8_t degrees);
132  uint8_t getSensorTemp(void) const;
133  void setFan(const uint8_t speed);
134  uint8_t getFan(void) const;
135  void setMode(const uint8_t mode);
136  uint8_t getMode(void) const;
137  void setSleep(const bool on);
138  bool getSleep(void) const;
139  void setSensor(const bool location);
140  bool getSensor(void) const;
141  void setBeep(const bool on);
142  bool getBeep(void) const;
143  void setSwingV(const uint8_t setting);
144  uint8_t getSwingV(void) const;
145  void setRaw(const uint8_t newState[]);
146  uint8_t* getRaw(void);
147  uint16_t getOffTimer(void) const;
148  void setOffTimer(const uint16_t mins);
149  static bool validChecksum(const uint8_t state[],
150  const uint16_t length = kSanyoAcStateLength);
151  static uint8_t convertMode(const stdAc::opmode_t mode);
152  static uint8_t convertFan(const stdAc::fanspeed_t speed);
153  static uint8_t convertSwingV(const stdAc::swingv_t position);
154  static stdAc::opmode_t toCommonMode(const uint8_t mode);
155  static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
156  static stdAc::swingv_t toCommonSwingV(const uint8_t setting);
157  stdAc::state_t toCommon(void) const;
158  String toString(void) const;
159 #ifndef UNIT_TEST
160 
161  private:
163 #else // UNIT_TEST
164  IRsendTest _irsend;
166 #endif // UNIT_TEST
169  void checksum(void);
170  static uint8_t calcChecksum(const uint8_t state[],
171  const uint16_t length = kSanyoAcStateLength);
172 };
173 
174 const uint8_t kSanyoAc88Auto = 0;
175 const uint8_t kSanyoAc88FeelCool = 1;
176 const uint8_t kSanyoAc88Cool = 2;
177 const uint8_t kSanyoAc88FeelHeat = 3;
178 const uint8_t kSanyoAc88Heat = 4;
179 const uint8_t kSanyoAc88Fan = 5;
180 
181 const uint8_t kSanyoAc88TempMin = 10;
182 const uint8_t kSanyoAc88TempMax = 30;
183 
184 const uint8_t kSanyoAc88FanAuto = 0;
185 const uint8_t kSanyoAc88FanLow = 1;
186 const uint8_t kSanyoAc88FanMedium = 2;
187 const uint8_t kSanyoAc88FanHigh = 3;
188 
192  // Ref: https://docs.google.com/spreadsheets/d/1weUmGAsEpfX38gg5rlDN69Uchnbr6gQl9FqHffLBIRk/edit#gid=0
193  struct {
194  // Byte 0-1
195  uint8_t :8; // 0xAA (Fixed?)
196  uint8_t :8; // 0x55 (Fixed?)
197  // Byte 2
198  uint8_t Fan :2;
199  uint8_t :2;
200  uint8_t Mode :3;
201  uint8_t Power :1;
202  // Byte 3
203  uint8_t Temp :5;
204  uint8_t Filter :1;
205  uint8_t SwingV :1;
206  uint8_t :1;
207  // Byte 4
208  uint8_t ClockSecs :8; // Nr. of Seconds
209  // Byte 5
210  uint8_t ClockMins :8; // Nr. of Minutes
211  // Byte 6
212  uint8_t ClockHrs :8; // Nr. of Hours
213  // Byte 7-9 (Timer times?)
214  uint8_t :8;
215  uint8_t :8;
216  uint8_t :8;
217  // Byte 10
218  uint8_t :3;
219  uint8_t Turbo :1;
220  uint8_t EnableStartTimer :1;
221  uint8_t EnableStopTimer :1;
222  uint8_t Sleep :1;
223  uint8_t :1;
224  };
225 };
226 
227 // Classes
229 class IRSanyoAc88 {
230  public:
231  explicit IRSanyoAc88(const uint16_t pin, const bool inverted = false,
232  const bool use_modulation = true);
233  void stateReset(void);
234 #if SEND_SANYO_AC88
235  void send(const uint16_t repeat = kSanyoAc88MinRepeat);
240  int8_t calibrate(void) { return _irsend.calibrate(); }
241 #endif // SEND_SANYO_AC88
242  void begin(void);
243  void on(void);
244  void off(void);
245  void setPower(const bool on);
246  bool getPower(void) const;
247  void setTemp(const uint8_t degrees);
248  uint8_t getTemp(void) const;
249  void setFan(const uint8_t speed);
250  uint8_t getFan(void) const;
251  void setMode(const uint8_t mode);
252  uint8_t getMode(void) const;
253  void setSleep(const bool on);
254  bool getSleep(void) const;
255  void setTurbo(const bool on);
256  bool getTurbo(void) const;
257  void setFilter(const bool on);
258  bool getFilter(void) const;
259  void setSwingV(const bool on);
260  bool getSwingV(void) const;
261  uint16_t getClock(void) const;
262  void setClock(const uint16_t mins_since_midnight);
263  void setRaw(const uint8_t newState[]);
264  uint8_t* getRaw(void);
265  static uint8_t convertMode(const stdAc::opmode_t mode);
266  static uint8_t convertFan(const stdAc::fanspeed_t speed);
267  static stdAc::opmode_t toCommonMode(const uint8_t mode);
268  static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
269  stdAc::state_t toCommon(void) const;
270  String toString(void) const;
271 #ifndef UNIT_TEST
272 
273  private:
275 #else // UNIT_TEST
276  IRsendTest _irsend;
278 #endif // UNIT_TEST
281  void checksum(void);
282  static uint8_t calcChecksum(const uint8_t state[],
283  const uint16_t length = kSanyoAcStateLength);
284 };
285 #endif // IR_SANYO_H_
SanyoProtocol::Sleep
uint8_t Sleep
Definition: ir_Sanyo.h:72
SanyoAc88Protocol::Power
uint8_t Power
Definition: ir_Sanyo.h:201
IRSanyoAc::_
SanyoProtocol _
Definition: ir_Sanyo.h:168
IRSanyoAc88::setTurbo
void setTurbo(const bool on)
Change the Turbo setting.
Definition: ir_Sanyo.cpp:923
SanyoAc88Protocol::ClockHrs
uint8_t ClockHrs
Definition: ir_Sanyo.h:212
kSanyoAcTempDelta
const uint8_t kSanyoAcTempDelta
Celsius to Native Temp difference.
Definition: ir_Sanyo.h:85
kSanyoAc88StateLength
const uint16_t kSanyoAc88StateLength
Definition: IRremoteESP8266.h:1363
stdAc::swingv_t
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:74
IRSanyoAc88::send
void send(const uint16_t repeat=kSanyoAc88MinRepeat)
Send the current internal state as IR messages.
Definition: ir_Sanyo.cpp:770
IRSanyoAc::getSensorTemp
uint8_t getSensorTemp(void) const
Get the current sensor temperature setting.
Definition: ir_Sanyo.cpp:469
IRSanyoAc88::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Sanyo.cpp:875
SanyoProtocol::Fan
uint8_t Fan
Definition: ir_Sanyo.h:61
SanyoProtocol::Beep
uint8_t Beep
Definition: ir_Sanyo.h:55
stdAc::fanspeed_t
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
SanyoAc88Protocol::ClockMins
uint8_t ClockMins
Definition: ir_Sanyo.h:210
IRSanyoAc::convertSwingV
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Sanyo.cpp:530
IRSanyoAc88::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Sanyo.cpp:809
IRSanyoAc88::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Sanyo.cpp:765
kSanyoAcHourMax
const uint8_t kSanyoAcHourMax
0b1111
Definition: ir_Sanyo.h:87
IRSanyoAc88::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Sanyo.cpp:804
IRSanyoAc::calcChecksum
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kSanyoAcStateLength)
Calculate the checksum for a given state.
Definition: ir_Sanyo.cpp:362
IRSanyoAc::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Sanyo.cpp:402
kSanyoAc88Fan
const uint8_t kSanyoAc88Fan
0b101
Definition: ir_Sanyo.h:179
IRSanyoAc88::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Sanyo.cpp:838
IRSanyoAc::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Sanyo.cpp:396
IRSanyoAc88::getSleep
bool getSleep(void) const
Get the value of the current Sleep setting.
Definition: ir_Sanyo.cpp:943
IRSanyoAc88::getClock
uint16_t getClock(void) const
Get the current clock time.
Definition: ir_Sanyo.cpp:888
kSanyoAcCool
const uint8_t kSanyoAcCool
0b010
Definition: ir_Sanyo.h:90
IRSanyoAc::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_Sanyo.h:162
IRsend.h
IRSanyoAc::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_Sanyo.cpp:390
IRSanyoAc88::IRSanyoAc88
IRSanyoAc88(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Sanyo.cpp:752
IRSanyoAc88::checksum
void checksum(void)
IRSanyoAc::send
void send(const uint16_t repeat=kNoRepeat)
Send the current internal state as IR messages.
Definition: ir_Sanyo.cpp:339
kSanyoAcDry
const uint8_t kSanyoAcDry
0b011
Definition: ir_Sanyo.h:91
SanyoAc88Protocol::Temp
uint8_t Temp
Definition: ir_Sanyo.h:203
IRSanyoAc::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Sanyo.cpp:409
IRsend
Class for sending all basic IR protocols.
Definition: IRsend.h:237
IRSanyoAc::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Sanyo.cpp:481
IRsend::calibrate
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
kSanyoAc88TempMax
const uint8_t kSanyoAc88TempMax
Celsius.
Definition: ir_Sanyo.h:182
kSanyoAcSwingVHigh
const uint8_t kSanyoAcSwingVHigh
0b110
Definition: ir_Sanyo.h:106
IRSanyoAc
Class for handling detailed Sanyo A/C messages.
Definition: ir_Sanyo.h:111
IRSanyoAc::getSleep
bool getSleep(void) const
Get the Sleep (Night Setback) setting of the A/C.
Definition: ir_Sanyo.cpp:564
kSanyoAcPowerOff
const uint8_t kSanyoAcPowerOff
Off.
Definition: ir_Sanyo.h:99
IRSanyoAc::setSensor
void setSensor(const bool location)
Set the Sensor Location setting of the A/C. i.e. Where the ambient temperature is measured.
Definition: ir_Sanyo.cpp:571
kSanyoAc88MinRepeat
const uint16_t kSanyoAc88MinRepeat
Definition: IRremoteESP8266.h:1365
String
std::string String
Definition: IRremoteESP8266.h:1521
kSanyoAc88FeelHeat
const uint8_t kSanyoAc88FeelHeat
0b011
Definition: ir_Sanyo.h:177
IRSanyoAc88::calcChecksum
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kSanyoAcStateLength)
kSanyoAcFanAuto
const uint8_t kSanyoAcFanAuto
0b00
Definition: ir_Sanyo.h:93
IRSanyoAc88::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Sanyo.cpp:758
IRSanyoAc::getSensor
bool getSensor(void) const
Get the Sensor Location setting of the A/C. i.e. Where the ambient temperature is measured.
Definition: ir_Sanyo.cpp:578
IRSanyoAc::setTemp
void setTemp(const uint8_t degrees)
Set the desired temperature.
Definition: ir_Sanyo.cpp:447
SanyoProtocol::OffTimer
uint8_t OffTimer
Definition: ir_Sanyo.h:62
kSanyoAc88TempMin
const uint8_t kSanyoAc88TempMin
Celsius.
Definition: ir_Sanyo.h:181
IRSanyoAc::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Sanyo.h:122
SanyoAc88Protocol
Native representation of a Sanyo 88-bit A/C message.
Definition: ir_Sanyo.h:190
kSanyoAcSwingVHighest
const uint8_t kSanyoAcSwingVHighest
0b111
Definition: ir_Sanyo.h:107
SanyoAc88Protocol::EnableStartTimer
uint8_t EnableStartTimer
Definition: ir_Sanyo.h:220
IRSanyoAc88::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Sanyo.h:240
IRremoteESP8266.h
IRSanyoAc88::getTemp
uint8_t getTemp(void) const
Get the current desired temperature setting.
Definition: ir_Sanyo.cpp:862
IRSanyoAc88::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Sanyo.cpp:800
IRSanyoAc88::toString
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Sanyo.cpp:973
IRSanyoAc88::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Sanyo.cpp:870
IRSanyoAc88::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Sanyo.cpp:947
IRSanyoAc::toString
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Sanyo.cpp:645
kSanyoAc88FanHigh
const uint8_t kSanyoAc88FanHigh
0b11
Definition: ir_Sanyo.h:187
kSanyoAcSwingVAuto
const uint8_t kSanyoAcSwingVAuto
0b000
Definition: ir_Sanyo.h:101
kNoRepeat
const uint16_t kNoRepeat
Definition: IRremoteESP8266.h:1145
SanyoAc88Protocol::Filter
uint8_t Filter
Definition: ir_Sanyo.h:204
IRSanyoAc88::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Sanyo.cpp:904
kSanyoAcTempMin
const uint8_t kSanyoAcTempMin
Celsius.
Definition: ir_Sanyo.h:83
kSanyoAcFanHigh
const uint8_t kSanyoAcFanHigh
0b01
Definition: ir_Sanyo.h:94
kSanyoAcSwingVLow
const uint8_t kSanyoAcSwingVLow
0b011
Definition: ir_Sanyo.h:103
IRSanyoAc88::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_Sanyo.cpp:796
IRSanyoAc::IRSanyoAc
IRSanyoAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Sanyo.cpp:322
IRSanyoAc88::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Sanyo.cpp:792
IRSanyoAc88::setSwingV
void setSwingV(const bool on)
Change the SwingV setting.
Definition: ir_Sanyo.cpp:915
SanyoAc88Protocol::EnableStopTimer
uint8_t EnableStopTimer
Definition: ir_Sanyo.h:221
IRSanyoAc::checksum
void checksum(void)
Calculate & set the checksum for the current internal state of the remote.
Definition: ir_Sanyo.cpp:376
kSanyoAcAuto
const uint8_t kSanyoAcAuto
0b100
Definition: ir_Sanyo.h:92
IRSanyoAc88::setSleep
void setSleep(const bool on)
Change the Sleep setting.
Definition: ir_Sanyo.cpp:939
IRSanyoAc88::setRaw
void setRaw(const uint8_t newState[])
Set the internal state from a valid code for this protocol.
Definition: ir_Sanyo.cpp:784
IRSanyoAc::getOffTimer
uint16_t getOffTimer(void) const
Get the nr of minutes the Off Timer is set to.
Definition: ir_Sanyo.cpp:598
IRSanyoAc::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Sanyo.cpp:617
IRSanyoAc88::setFan
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Sanyo.cpp:866
IRSanyoAc::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Sanyo.cpp:424
SanyoProtocol::raw
uint8_t raw[kSanyoAcStateLength]
The state in IR code form.
Definition: ir_Sanyo.h:44
IRSanyoAc::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Sanyo.cpp:334
SanyoProtocol::OffHour
uint8_t OffHour
Definition: ir_Sanyo.h:58
kSanyoAcHeat
const uint8_t kSanyoAcHeat
0b001
Definition: ir_Sanyo.h:89
SanyoAc88Protocol::ClockSecs
uint8_t ClockSecs
Definition: ir_Sanyo.h:208
IRSanyoAc::setSwingV
void setSwingV(const uint8_t setting)
Set the vertical swing setting of the A/C.
Definition: ir_Sanyo.cpp:519
IRSanyoAc88::_
SanyoAc88Protocol _
Definition: ir_Sanyo.h:280
SanyoAc88Protocol::Fan
uint8_t Fan
Definition: ir_Sanyo.h:198
kSanyoAc88Auto
const uint8_t kSanyoAc88Auto
0b000
Definition: ir_Sanyo.h:174
SanyoProtocol::SensorTemp
uint8_t SensorTemp
Definition: ir_Sanyo.h:53
IRSanyoAc::toCommonSwingV
static stdAc::swingv_t toCommonSwingV(const uint8_t setting)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_Sanyo.cpp:544
IRSanyoAc::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Sanyo.cpp:488
kSanyoAc88Cool
const uint8_t kSanyoAc88Cool
0b010
Definition: ir_Sanyo.h:176
IRSanyoAc::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Sanyo.cpp:436
IRSanyoAc88::setFilter
void setFilter(const bool on)
Change the Filter setting.
Definition: ir_Sanyo.cpp:931
kSanyoAcSwingVUpperMiddle
const uint8_t kSanyoAcSwingVUpperMiddle
0b101
Definition: ir_Sanyo.h:105
kSanyoAc88Heat
const uint8_t kSanyoAc88Heat
0b100
Definition: ir_Sanyo.h:178
kSanyoAc88FanLow
const uint8_t kSanyoAc88FanLow
0b11
Definition: ir_Sanyo.h:185
SanyoProtocol::Mode
uint8_t Mode
Definition: ir_Sanyo.h:64
SanyoAc88Protocol::Mode
uint8_t Mode
Definition: ir_Sanyo.h:200
SanyoProtocol
Native representation of a Sanyo A/C message.
Definition: ir_Sanyo.h:43
kSanyoAc88FeelCool
const uint8_t kSanyoAc88FeelCool
0b001
Definition: ir_Sanyo.h:175
IRSanyoAc::getTemp
uint8_t getTemp(void) const
Get the current desired temperature setting.
Definition: ir_Sanyo.cpp:455
IRSanyoAc::getSwingV
uint8_t getSwingV(void) const
Get the vertical swing setting of the A/C.
Definition: ir_Sanyo.cpp:513
SanyoAc88Protocol::raw
uint8_t raw[kSanyoAc88StateLength]
The state in IR code form.
Definition: ir_Sanyo.h:191
kSanyoAcFanMedium
const uint8_t kSanyoAcFanMedium
0b11
Definition: ir_Sanyo.h:96
IRSanyoAc::setSleep
void setSleep(const bool on)
Set the Sleep (Night Setback) setting of the A/C.
Definition: ir_Sanyo.cpp:558
SanyoProtocol::Temp
uint8_t Temp
Definition: ir_Sanyo.h:50
SanyoAc88Protocol::Sleep
uint8_t Sleep
Definition: ir_Sanyo.h:222
IRSanyoAc88::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Sanyo.cpp:826
kSanyoAcPowerOn
const uint8_t kSanyoAcPowerOn
On.
Definition: ir_Sanyo.h:100
kSanyoAcTempMax
const uint8_t kSanyoAcTempMax
Celsius.
Definition: ir_Sanyo.h:84
IRSanyoAc88::getSwingV
bool getSwingV(void) const
Get the value of the current SwingV setting.
Definition: ir_Sanyo.cpp:919
IRSanyoAc::setFan
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Sanyo.cpp:475
kSanyoAcFanLow
const uint8_t kSanyoAcFanLow
0b10
Definition: ir_Sanyo.h:95
kSanyoAcSwingVLowest
const uint8_t kSanyoAcSwingVLowest
0b010
Definition: ir_Sanyo.h:102
SanyoProtocol::Power
uint8_t Power
Definition: ir_Sanyo.h:69
IRSanyoAc88::setClock
void setClock(const uint16_t mins_since_midnight)
Set the current clock time.
Definition: ir_Sanyo.cpp:894
kSanyoAcSwingVLowerMiddle
const uint8_t kSanyoAcSwingVLowerMiddle
0b100
Definition: ir_Sanyo.h:104
IRSanyoAc88::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_Sanyo.h:274
IRSanyoAc88::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol with all integrity checks passing.
Definition: ir_Sanyo.cpp:778
IRSanyoAc::setBeep
void setBeep(const bool on)
Set the Beep setting of the A/C.
Definition: ir_Sanyo.cpp:584
IRSanyoAc88::on
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Sanyo.cpp:789
kSanyoAcStateLength
const uint16_t kSanyoAcStateLength
Definition: IRremoteESP8266.h:1361
IRSanyoAc::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol with all integrity checks passing.
Definition: ir_Sanyo.cpp:347
SanyoAc88Protocol::SwingV
uint8_t SwingV
Definition: ir_Sanyo.h:205
IRSanyoAc::setSensorTemp
void setSensorTemp(const uint8_t degrees)
Set the sensor temperature.
Definition: ir_Sanyo.cpp:461
IRSanyoAc::stateReset
void stateReset(void)
Reset the state of the remote to a known state/sequence.
Definition: ir_Sanyo.cpp:327
IRSanyoAc::on
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Sanyo.cpp:383
SanyoProtocol::Sum
uint8_t Sum
Definition: ir_Sanyo.h:77
IRSanyoAc88::getTurbo
bool getTurbo(void) const
Get the value of the current Turbo setting.
Definition: ir_Sanyo.cpp:927
IRSanyoAc::setRaw
void setRaw(const uint8_t newState[])
Set the internal state from a valid code for this protocol.
Definition: ir_Sanyo.cpp:354
IRSanyoAc88::setTemp
void setTemp(const uint8_t degrees)
Set the desired temperature.
Definition: ir_Sanyo.cpp:855
IRSanyoAc88::getFilter
bool getFilter(void) const
Get the value of the current Filter setting.
Definition: ir_Sanyo.cpp:935
IRSanyoAc::setOffTimer
void setOffTimer(const uint16_t mins)
Set the nr of minutes for the Off Timer.
Definition: ir_Sanyo.cpp:609
IRSanyoAc::validChecksum
static bool validChecksum(const uint8_t state[], const uint16_t length=kSanyoAcStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Sanyo.cpp:371
kSanyoAc88FanAuto
const uint8_t kSanyoAc88FanAuto
0b00
Definition: ir_Sanyo.h:184
stdAc::state_t
Structure to hold a common A/C state.
Definition: IRsend.h:114
SanyoProtocol::Sensor
uint8_t Sensor
Sensor location (0 = remote, 1 = A/C)
Definition: ir_Sanyo.h:54
IRSanyoAc::getBeep
bool getBeep(void) const
Get the Beep setting of the A/C.
Definition: ir_Sanyo.cpp:590
IRSanyoAc88
Class for handling detailed Sanyo A/C messages.
Definition: ir_Sanyo.h:229
IRSanyoAc::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Sanyo.cpp:502
SanyoAc88Protocol::Turbo
uint8_t Turbo
Definition: ir_Sanyo.h:219
kSanyoAc88FanMedium
const uint8_t kSanyoAc88FanMedium
0b10
Definition: ir_Sanyo.h:186
IRSanyoAc::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Sanyo.cpp:386
SanyoProtocol::SwingV
uint8_t SwingV
Definition: ir_Sanyo.h:67
stdAc::opmode_t
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49