Go to the documentation of this file.
22 #include "IRsend_test.h"
63 #define TROTEC_AUTO kTrotecAuto
64 #define TROTEC_COOL kTrotecCool
65 #define TROTEC_DRY kTrotecDry
66 #define TROTEC_FAN kTrotecFan
67 #define TROTEC_FAN_LOW kTrotecFanLow
68 #define TROTEC_FAN_MED kTrotecFanMed
69 #define TROTEC_FAN_HIGH kTrotecFanHigh
70 #define TROTEC_MIN_TEMP kTrotecMinTemp
71 #define TROTEC_MAX_TEMP kTrotecMaxTemp
72 #define TROTEC_MAX_TIMER kTrotecMaxTimer
78 explicit IRTrotecESP(
const uint16_t pin,
const bool inverted =
false,
79 const bool use_modulation =
true);
96 void setTemp(
const uint8_t celsius);
103 void setMode(
const uint8_t mode);
112 void setRaw(
const uint8_t state[]);
136 #endif // IR_TROTEC_H_
uint8_t getTemp(void)
Get the current temperature setting.
Definition: ir_Trotec.cpp:184
const uint8_t kTrotecFanOffset
Definition: ir_Trotec.h:42
void checksum(void)
Calculate & set the checksum for the current internal state of the remote.
Definition: ir_Trotec.cpp:98
const uint8_t kTrotecTimerBitOffset
Definition: ir_Trotec.h:57
bool getSleep(void)
Get the Sleep setting of the A/C.
Definition: ir_Trotec.cpp:197
const uint16_t kTrotecDefaultRepeat
Definition: IRremoteESP8266.h:1037
uint8_t getMode(void)
Get the operating mode setting of the A/C.
Definition: ir_Trotec.cpp:169
const uint8_t kTrotecSleepBitOffset
Definition: ir_Trotec.h:54
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
String toString(void)
Convert the current internal state into a human readable string.
Definition: ir_Trotec.cpp:291
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Trotec.cpp:70
bool getPower(void)
Get the value of the current power setting.
Definition: ir_Trotec.cpp:143
const uint8_t kTrotecFanMed
Definition: ir_Trotec.h:45
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Trotec.cpp:118
const uint8_t kTrotecIntro2
Definition: ir_Trotec.h:30
const uint8_t kTrotecFanHigh
Definition: ir_Trotec.h:46
Class for sending all basic IR protocols.
Definition: IRsend.h:176
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
std::string String
Definition: IRremoteESP8266.h:1128
static bool validChecksum(const uint8_t state[], const uint16_t length=kTrotecStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Trotec.cpp:93
const uint8_t kTrotecMinTemp
Definition: ir_Trotec.h:51
const uint8_t kTrotecDefTemp
Definition: ir_Trotec.h:52
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Trotec.cpp:130
const uint8_t kTrotecMaxTimer
Definition: ir_Trotec.h:60
stdAc::state_t toCommon(void)
Convert the current internal state into its stdAc::state_t equivilant.
Definition: ir_Trotec.cpp:265
uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Trotec.cpp:215
const uint8_t kTrotecDry
Definition: ir_Trotec.h:37
const uint8_t kTrotecTempOffset
Definition: ir_Trotec.h:49
uint8_t getTimer(void)
Get the timer time in nr. of Hours.
Definition: ir_Trotec.cpp:210
void setTemp(const uint8_t celsius)
Set the temperature.
Definition: ir_Trotec.cpp:175
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Trotec.cpp:162
const uint16_t kTrotecStateLength
Definition: IRremoteESP8266.h:1035
const uint8_t kTrotecMaxTemp
Definition: ir_Trotec.h:53
const uint8_t kTrotecFanLow
Definition: ir_Trotec.h:44
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Trotec.cpp:104
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Trotec.h:86
void setTimer(const uint8_t timer)
Set the timer time in nr. of Hours.
Definition: ir_Trotec.cpp:203
void setPower(const bool state)
Change the power setting.
Definition: ir_Trotec.cpp:137
const uint8_t kTrotecFan
Definition: ir_Trotec.h:38
const uint8_t kTrotecModeSize
Definition: ir_Trotec.h:34
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivilant.
Definition: ir_Trotec.cpp:242
IRsend _irsend
Instance of the IR send class.
Definition: ir_Trotec.h:124
const uint8_t kTrotecCool
Definition: ir_Trotec.h:36
void setSleep(const bool on)
Set the Sleep setting of the A/C.
Definition: ir_Trotec.cpp:191
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Trotec.cpp:133
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kTrotecStateLength)
Calculate the checksum for a given state.
Definition: ir_Trotec.cpp:84
void send(const uint16_t repeat=kTrotecDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Trotec.cpp:75
uint8_t remote_state[kTrotecStateLength]
Remote state in IR code form.
Definition: ir_Trotec.h:130
const uint8_t kTrotecModeOffset
Definition: ir_Trotec.h:33
const uint8_t kTrotecAuto
Definition: ir_Trotec.h:35
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivilant.
Definition: ir_Trotec.cpp:254
Class for handling detailed Trotec A/C messages.
Definition: ir_Trotec.h:76
const uint8_t kTrotecFanSize
Definition: ir_Trotec.h:43
uint8_t getSpeed(void)
Get the current fan speed setting.
Definition: ir_Trotec.cpp:156
IRTrotecESP(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Trotec.cpp:65
const uint8_t kTrotecTempSize
Definition: ir_Trotec.h:50
uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Trotec.cpp:228
Structure to hold a common A/C state.
Definition: IRsend.h:97
const uint8_t kTrotecIntro1
Definition: ir_Trotec.h:27
void setRaw(const uint8_t state[])
Set the internal state from a valid code for this protocol.
Definition: ir_Trotec.cpp:125
void setSpeed(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Trotec.cpp:149
const uint8_t kTrotecPowerBitOffset
Definition: ir_Trotec.h:40
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46