Go to the documentation of this file.
31 #define __STDC_LIMIT_MACROS
39 #include "IRsend_test.h"
113 explicit IRSanyoAc(
const uint16_t pin,
const bool inverted =
false,
114 const bool use_modulation =
true);
123 #endif // SEND_SANYO_AC
129 void setTemp(
const uint8_t degrees);
133 void setFan(
const uint8_t speed);
134 uint8_t
getFan(
void)
const;
135 void setMode(
const uint8_t mode);
145 void setRaw(
const uint8_t newState[]);
231 explicit IRSanyoAc88(
const uint16_t pin,
const bool inverted =
false,
232 const bool use_modulation =
true);
241 #endif // SEND_SANYO_AC88
247 void setTemp(
const uint8_t degrees);
249 void setFan(
const uint8_t speed);
250 uint8_t
getFan(
void)
const;
251 void setMode(
const uint8_t mode);
262 void setClock(
const uint16_t mins_since_midnight);
263 void setRaw(
const uint8_t newState[]);
285 #endif // IR_SANYO_H_
uint8_t Sleep
Definition: ir_Sanyo.h:72
uint8_t Power
Definition: ir_Sanyo.h:201
SanyoProtocol _
Definition: ir_Sanyo.h:168
void setTurbo(const bool on)
Change the Turbo setting.
Definition: ir_Sanyo.cpp:923
uint8_t ClockHrs
Definition: ir_Sanyo.h:212
const uint8_t kSanyoAcTempDelta
Celsius to Native Temp difference.
Definition: ir_Sanyo.h:85
const uint16_t kSanyoAc88StateLength
Definition: IRremoteESP8266.h:1363
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:74
void send(const uint16_t repeat=kSanyoAc88MinRepeat)
Send the current internal state as IR messages.
Definition: ir_Sanyo.cpp:770
uint8_t getSensorTemp(void) const
Get the current sensor temperature setting.
Definition: ir_Sanyo.cpp:469
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
uint8_t Fan
Definition: ir_Sanyo.h:61
uint8_t Beep
Definition: ir_Sanyo.h:55
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint8_t ClockMins
Definition: ir_Sanyo.h:210
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
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Sanyo.cpp:809
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Sanyo.cpp:765
const uint8_t kSanyoAcHourMax
0b1111
Definition: ir_Sanyo.h:87
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Sanyo.cpp:804
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
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Sanyo.cpp:402
const uint8_t kSanyoAc88Fan
0b101
Definition: ir_Sanyo.h:179
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Sanyo.cpp:838
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Sanyo.cpp:396
bool getSleep(void) const
Get the value of the current Sleep setting.
Definition: ir_Sanyo.cpp:943
uint16_t getClock(void) const
Get the current clock time.
Definition: ir_Sanyo.cpp:888
const uint8_t kSanyoAcCool
0b010
Definition: ir_Sanyo.h:90
IRsend _irsend
Instance of the IR send class.
Definition: ir_Sanyo.h:162
void setPower(const bool on)
Change the power setting.
Definition: ir_Sanyo.cpp:390
IRSanyoAc88(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Sanyo.cpp:752
void send(const uint16_t repeat=kNoRepeat)
Send the current internal state as IR messages.
Definition: ir_Sanyo.cpp:339
const uint8_t kSanyoAcDry
0b011
Definition: ir_Sanyo.h:91
uint8_t Temp
Definition: ir_Sanyo.h:203
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Sanyo.cpp:409
Class for sending all basic IR protocols.
Definition: IRsend.h:237
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Sanyo.cpp:481
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
const uint8_t kSanyoAc88TempMax
Celsius.
Definition: ir_Sanyo.h:182
const uint8_t kSanyoAcSwingVHigh
0b110
Definition: ir_Sanyo.h:106
Class for handling detailed Sanyo A/C messages.
Definition: ir_Sanyo.h:111
bool getSleep(void) const
Get the Sleep (Night Setback) setting of the A/C.
Definition: ir_Sanyo.cpp:564
const uint8_t kSanyoAcPowerOff
Off.
Definition: ir_Sanyo.h:99
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
const uint16_t kSanyoAc88MinRepeat
Definition: IRremoteESP8266.h:1365
std::string String
Definition: IRremoteESP8266.h:1521
const uint8_t kSanyoAc88FeelHeat
0b011
Definition: ir_Sanyo.h:177
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kSanyoAcStateLength)
const uint8_t kSanyoAcFanAuto
0b00
Definition: ir_Sanyo.h:93
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Sanyo.cpp:758
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
void setTemp(const uint8_t degrees)
Set the desired temperature.
Definition: ir_Sanyo.cpp:447
uint8_t OffTimer
Definition: ir_Sanyo.h:62
const uint8_t kSanyoAc88TempMin
Celsius.
Definition: ir_Sanyo.h:181
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Sanyo.h:122
Native representation of a Sanyo 88-bit A/C message.
Definition: ir_Sanyo.h:190
const uint8_t kSanyoAcSwingVHighest
0b111
Definition: ir_Sanyo.h:107
uint8_t EnableStartTimer
Definition: ir_Sanyo.h:220
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Sanyo.h:240
uint8_t getTemp(void) const
Get the current desired temperature setting.
Definition: ir_Sanyo.cpp:862
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Sanyo.cpp:800
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Sanyo.cpp:973
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Sanyo.cpp:870
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Sanyo.cpp:947
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Sanyo.cpp:645
const uint8_t kSanyoAc88FanHigh
0b11
Definition: ir_Sanyo.h:187
const uint8_t kSanyoAcSwingVAuto
0b000
Definition: ir_Sanyo.h:101
const uint16_t kNoRepeat
Definition: IRremoteESP8266.h:1145
uint8_t Filter
Definition: ir_Sanyo.h:204
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Sanyo.cpp:904
const uint8_t kSanyoAcTempMin
Celsius.
Definition: ir_Sanyo.h:83
const uint8_t kSanyoAcFanHigh
0b01
Definition: ir_Sanyo.h:94
const uint8_t kSanyoAcSwingVLow
0b011
Definition: ir_Sanyo.h:103
void setPower(const bool on)
Change the power setting.
Definition: ir_Sanyo.cpp:796
IRSanyoAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Sanyo.cpp:322
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Sanyo.cpp:792
void setSwingV(const bool on)
Change the SwingV setting.
Definition: ir_Sanyo.cpp:915
uint8_t EnableStopTimer
Definition: ir_Sanyo.h:221
void checksum(void)
Calculate & set the checksum for the current internal state of the remote.
Definition: ir_Sanyo.cpp:376
const uint8_t kSanyoAcAuto
0b100
Definition: ir_Sanyo.h:92
void setSleep(const bool on)
Change the Sleep setting.
Definition: ir_Sanyo.cpp:939
void setRaw(const uint8_t newState[])
Set the internal state from a valid code for this protocol.
Definition: ir_Sanyo.cpp:784
uint16_t getOffTimer(void) const
Get the nr of minutes the Off Timer is set to.
Definition: ir_Sanyo.cpp:598
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Sanyo.cpp:617
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Sanyo.cpp:866
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Sanyo.cpp:424
uint8_t raw[kSanyoAcStateLength]
The state in IR code form.
Definition: ir_Sanyo.h:44
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Sanyo.cpp:334
uint8_t OffHour
Definition: ir_Sanyo.h:58
const uint8_t kSanyoAcHeat
0b001
Definition: ir_Sanyo.h:89
uint8_t ClockSecs
Definition: ir_Sanyo.h:208
void setSwingV(const uint8_t setting)
Set the vertical swing setting of the A/C.
Definition: ir_Sanyo.cpp:519
SanyoAc88Protocol _
Definition: ir_Sanyo.h:280
uint8_t Fan
Definition: ir_Sanyo.h:198
const uint8_t kSanyoAc88Auto
0b000
Definition: ir_Sanyo.h:174
uint8_t SensorTemp
Definition: ir_Sanyo.h:53
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
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
const uint8_t kSanyoAc88Cool
0b010
Definition: ir_Sanyo.h:176
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Sanyo.cpp:436
void setFilter(const bool on)
Change the Filter setting.
Definition: ir_Sanyo.cpp:931
const uint8_t kSanyoAcSwingVUpperMiddle
0b101
Definition: ir_Sanyo.h:105
const uint8_t kSanyoAc88Heat
0b100
Definition: ir_Sanyo.h:178
const uint8_t kSanyoAc88FanLow
0b11
Definition: ir_Sanyo.h:185
uint8_t Mode
Definition: ir_Sanyo.h:64
uint8_t Mode
Definition: ir_Sanyo.h:200
Native representation of a Sanyo A/C message.
Definition: ir_Sanyo.h:43
const uint8_t kSanyoAc88FeelCool
0b001
Definition: ir_Sanyo.h:175
uint8_t getTemp(void) const
Get the current desired temperature setting.
Definition: ir_Sanyo.cpp:455
uint8_t getSwingV(void) const
Get the vertical swing setting of the A/C.
Definition: ir_Sanyo.cpp:513
uint8_t raw[kSanyoAc88StateLength]
The state in IR code form.
Definition: ir_Sanyo.h:191
const uint8_t kSanyoAcFanMedium
0b11
Definition: ir_Sanyo.h:96
void setSleep(const bool on)
Set the Sleep (Night Setback) setting of the A/C.
Definition: ir_Sanyo.cpp:558
uint8_t Temp
Definition: ir_Sanyo.h:50
uint8_t Sleep
Definition: ir_Sanyo.h:222
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Sanyo.cpp:826
const uint8_t kSanyoAcPowerOn
On.
Definition: ir_Sanyo.h:100
const uint8_t kSanyoAcTempMax
Celsius.
Definition: ir_Sanyo.h:84
bool getSwingV(void) const
Get the value of the current SwingV setting.
Definition: ir_Sanyo.cpp:919
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Sanyo.cpp:475
const uint8_t kSanyoAcFanLow
0b10
Definition: ir_Sanyo.h:95
const uint8_t kSanyoAcSwingVLowest
0b010
Definition: ir_Sanyo.h:102
uint8_t Power
Definition: ir_Sanyo.h:69
void setClock(const uint16_t mins_since_midnight)
Set the current clock time.
Definition: ir_Sanyo.cpp:894
const uint8_t kSanyoAcSwingVLowerMiddle
0b100
Definition: ir_Sanyo.h:104
IRsend _irsend
Instance of the IR send class.
Definition: ir_Sanyo.h:274
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
void setBeep(const bool on)
Set the Beep setting of the A/C.
Definition: ir_Sanyo.cpp:584
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Sanyo.cpp:789
const uint16_t kSanyoAcStateLength
Definition: IRremoteESP8266.h:1361
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
uint8_t SwingV
Definition: ir_Sanyo.h:205
void setSensorTemp(const uint8_t degrees)
Set the sensor temperature.
Definition: ir_Sanyo.cpp:461
void stateReset(void)
Reset the state of the remote to a known state/sequence.
Definition: ir_Sanyo.cpp:327
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Sanyo.cpp:383
uint8_t Sum
Definition: ir_Sanyo.h:77
bool getTurbo(void) const
Get the value of the current Turbo setting.
Definition: ir_Sanyo.cpp:927
void setRaw(const uint8_t newState[])
Set the internal state from a valid code for this protocol.
Definition: ir_Sanyo.cpp:354
void setTemp(const uint8_t degrees)
Set the desired temperature.
Definition: ir_Sanyo.cpp:855
bool getFilter(void) const
Get the value of the current Filter setting.
Definition: ir_Sanyo.cpp:935
void setOffTimer(const uint16_t mins)
Set the nr of minutes for the Off Timer.
Definition: ir_Sanyo.cpp:609
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
const uint8_t kSanyoAc88FanAuto
0b00
Definition: ir_Sanyo.h:184
Structure to hold a common A/C state.
Definition: IRsend.h:114
uint8_t Sensor
Sensor location (0 = remote, 1 = A/C)
Definition: ir_Sanyo.h:54
bool getBeep(void) const
Get the Beep setting of the A/C.
Definition: ir_Sanyo.cpp:590
Class for handling detailed Sanyo A/C messages.
Definition: ir_Sanyo.h:229
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Sanyo.cpp:502
uint8_t Turbo
Definition: ir_Sanyo.h:219
const uint8_t kSanyoAc88FanMedium
0b10
Definition: ir_Sanyo.h:186
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Sanyo.cpp:386
uint8_t SwingV
Definition: ir_Sanyo.h:67
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49