Go to the documentation of this file.
19 #include "IRsend_test.h"
58 const uint64_t
kTecoReset = 0b01001010000000000000010000000000000;
64 explicit IRTecoAc(
const uint16_t pin,
const bool inverted =
false,
65 const bool use_modulation =
true);
82 void setTemp(
const uint8_t temp);
85 void setFan(
const uint8_t fan);
86 uint8_t
getFan(
void)
const;
88 void setMode(
const uint8_t mode);
109 uint64_t
getRaw(
void)
const;
110 void setRaw(
const uint64_t new_code);
uint8_t TensHours
Definition: ir_Teco.h:33
uint8_t TimerOn
Definition: ir_Teco.h:34
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Teco.cpp:322
const uint8_t kTecoFanMed
Definition: ir_Teco.h:53
const uint64_t kTecoReset
Definition: ir_Teco.h:58
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Teco.cpp:272
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Teco.cpp:82
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
bool getLight(void) const
Get the Light (LED/Display) setting of the A/C.
Definition: ir_Teco.cpp:184
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Teco.cpp:245
uint8_t Swing
Definition: ir_Teco.h:29
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Teco.cpp:148
uint8_t Humid
Definition: ir_Teco.h:36
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Teco.h:73
uint8_t Save
Definition: ir_Teco.h:39
const uint8_t kTecoMinTemp
Definition: ir_Teco.h:55
void setRaw(const uint64_t new_code)
Set the internal state from a valid code for this protocol.
Definition: ir_Teco.cpp:76
IRTecoAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Teco.cpp:49
const uint8_t kTecoMaxTemp
Definition: ir_Teco.h:56
uint8_t UnitHours
Definition: ir_Teco.h:35
Class for sending all basic IR protocols.
Definition: IRsend.h:237
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Teco.cpp:79
const uint8_t kTecoDry
Definition: ir_Teco.h:48
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 kTecoHeat
Definition: ir_Teco.h:50
uint16_t getTimer(void) const
Get the timer time for when the A/C unit will switch power state.
Definition: ir_Teco.cpp:220
std::string String
Definition: IRremoteESP8266.h:1521
Native representation of a Teco A/C message.
Definition: ir_Teco.h:23
void setPower(const bool on)
Change the power setting.
Definition: ir_Teco.cpp:86
void setSwing(const bool on)
Set the (vertical) swing setting of the A/C.
Definition: ir_Teco.cpp:154
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Teco.cpp:107
bool getSleep(void) const
Get the Sleep setting of the A/C.
Definition: ir_Teco.cpp:172
void setHumid(const bool on)
Set the Humid setting of the A/C.
Definition: ir_Teco.cpp:190
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Teco.cpp:92
void setTimer(const uint16_t mins)
Set the timer for when the A/C unit will switch power state.
Definition: ir_Teco.cpp:233
const uint8_t kTecoFanLow
Definition: ir_Teco.h:52
void setSleep(const bool on)
Set the Sleep setting of the A/C.
Definition: ir_Teco.cpp:166
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Teco.cpp:54
const uint16_t kTecoDefaultRepeat
Definition: IRremoteESP8266.h:1396
uint8_t Temp
Definition: ir_Teco.h:31
const uint8_t kTecoFanAuto
Definition: ir_Teco.h:51
uint8_t Fan
Definition: ir_Teco.h:28
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Teco.cpp:127
const uint8_t kTecoCool
Definition: ir_Teco.h:47
bool getTimerEnabled(void) const
Is the timer function enabled?
Definition: ir_Teco.cpp:214
bool getSwing(void) const
Get the (vertical) swing setting of the A/C.
Definition: ir_Teco.cpp:160
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Teco.cpp:98
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Teco.cpp:133
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Teco.cpp:285
bool getHumid(void) const
Get the Humid setting of the A/C.
Definition: ir_Teco.cpp:196
void setSave(const bool on)
Set the Save setting of the A/C.
Definition: ir_Teco.cpp:202
void stateReset(void)
Reset the internal state of the emulation.
Definition: ir_Teco.cpp:66
TecoProtocol _
Definition: ir_Teco.h:127
uint8_t HalfHour
Definition: ir_Teco.h:32
uint64_t getRaw(void) const
Get a copy of the internal state/code for this protocol.
Definition: ir_Teco.cpp:72
const uint8_t kTecoFan
Definition: ir_Teco.h:49
uint8_t Light
Definition: ir_Teco.h:37
bool getSave(void) const
Get the Save setting of the A/C.
Definition: ir_Teco.cpp:208
uint8_t Power
Definition: ir_Teco.h:27
Class for handling detailed Teco A/C messages.
Definition: ir_Teco.h:62
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Teco.cpp:258
uint8_t Sleep
Definition: ir_Teco.h:30
uint8_t Mode
Definition: ir_Teco.h:26
IRsend _irsend
Instance of the IR send class.
Definition: ir_Teco.h:121
uint64_t raw
The state of the IR remote in IR code form.
Definition: ir_Teco.h:24
void setLight(const bool on)
Set the Light (LED/Display) setting of the A/C.
Definition: ir_Teco.cpp:178
void send(const uint16_t repeat=kTecoDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Teco.cpp:59
const uint8_t kTecoFanHigh
Definition: ir_Teco.h:54
Structure to hold a common A/C state.
Definition: IRsend.h:114
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Teco.cpp:296
const uint8_t kTecoAuto
Definition: ir_Teco.h:46
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Teco.cpp:113
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49