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