Go to the documentation of this file.
13 #define __STDC_LIMIT_MACROS
21 #include "IRsend_test.h"
68 0x08, 0x10, 0x07, 0x02, 0x40, 0x08,
69 0x03, 0x18, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00,
92 explicit IRYorkAc(
const uint16_t pin,
const bool inverted =
false,
93 const bool use_modulation =
true);
106 void setTemp(
const uint8_t temp);
108 void setFan(
const uint8_t speed);
110 void setMode(
const uint8_t mode);
117 void setRaw(
const uint8_t new_code[],
uint8_t Chk2
Definition: ir_York.h:62
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_York.cpp:234
uint8_t getFan() const
Get the current fan speed setting.
Definition: ir_York.cpp:209
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_York.h:101
Class for handling detailed York A/C messages.
Definition: ir_York.h:90
const uint8_t kYorkMaxTemp
Definition: ir_York.h:75
Native representation of a York A/C message.
Definition: ir_York.h:26
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint16_t getOnTimer(void) const
Get the On Timer setting of the A/C.
Definition: ir_York.cpp:274
void setRaw(const uint8_t new_code[], const uint16_t length=kYorkStateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_York.cpp:127
uint8_t SwingV
Definition: ir_York.h:56
void calcChecksum()
CRC16-16 (a.k.a. CRC-16-IBM)
Definition: ir_York.cpp:286
const uint8_t kYorkFan
Definition: ir_York.h:85
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_York.cpp:191
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_York.cpp:164
const uint8_t kYorkFanLow
Definition: ir_York.h:77
const uint8_t kYorkDry
Definition: ir_York.h:84
Class for sending all basic IR protocols.
Definition: IRsend.h:237
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 kYorkAuto
Definition: ir_York.h:86
std::string String
Definition: IRremoteESP8266.h:1521
uint8_t Key1
Definition: ir_York.h:32
uint8_t OffTimer
Definition: ir_York.h:48
void setOffTimer(const uint16_t mins)
Set the Off Timer value of the A/C.
Definition: ir_York.cpp:267
IRYorkAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_York.cpp:101
YorkProtocol _
Definition: ir_York.h:135
uint8_t OnTimer
Definition: ir_York.h:50
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_York.cpp:177
const uint8_t kYorkCool
Definition: ir_York.h:83
uint8_t * getRaw()
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
Definition: ir_York.cpp:119
uint8_t getMode() const
Get the current operation mode setting.
Definition: ir_York.cpp:141
const uint16_t kNoRepeat
Definition: IRremoteESP8266.h:1145
uint16_t getOffTimer(void) const
Get the Off Timer setting of the A/C.
Definition: ir_York.cpp:281
void setPowerToggle(const bool on)
const uint16_t kYorkStateLength
Definition: IRremoteESP8266.h:1437
String toString() const
Convert the current internal state into a human readable string.
Definition: ir_York.cpp:341
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_York.cpp:216
uint8_t Key2
Definition: ir_York.h:34
const uint8_t kYorkFanHigh
Definition: ir_York.h:79
uint8_t Power
Definition: ir_York.h:39
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_York.cpp:245
uint8_t Temp
Definition: ir_York.h:46
void setOnTimer(const uint16_t mins)
Set the On Timer value of the A/C.
Definition: ir_York.cpp:259
uint8_t Chk1
Definition: ir_York.h:61
uint8_t raw[kYorkStateLength]
The state of the IR remote.
Definition: ir_York.h:27
const uint8_t kYorkFanMedium
Definition: ir_York.h:78
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition: ir_York.cpp:147
uint8_t Fan
Definition: ir_York.h:38
const uint8_t kYorkFanAuto
Definition: ir_York.h:80
const uint8_t kYorkMinTemp
Definition: ir_York.h:74
stdAc::state_t toCommon(const stdAc::state_t *prev=NULL) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_York.cpp:307
IRsend _irsend
Instance of the IR send class.
Definition: ir_York.h:129
void begin()
Set up hardware to be able to send a message.
Definition: ir_York.cpp:114
void send(const uint16_t repeat=kNoRepeat)
Send the current internal state as an IR message.
Definition: ir_York.cpp:134
const uint8_t kYorkHeat
Definition: ir_York.h:82
bool getPowerToggle() const
Structure to hold a common A/C state.
Definition: IRsend.h:114
uint8_t Mode
Definition: ir_York.h:42
uint8_t getTemp() const
Get the current temperature setting.
Definition: ir_York.cpp:251
void stateReset()
Definition: ir_York.cpp:108
uint8_t preamble[6]
Definition: ir_York.h:30
const uint8_t kYorkKnownGoodState[kYorkStateLength]
Definition: ir_York.h:67
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49