Go to the documentation of this file.
23 #include "IRsend_test.h"
119 #define TROTEC_AUTO kTrotecAuto
120 #define TROTEC_COOL kTrotecCool
121 #define TROTEC_DRY kTrotecDry
122 #define TROTEC_FAN kTrotecFan
123 #define TROTEC_FAN_LOW kTrotecFanLow
124 #define TROTEC_FAN_MED kTrotecFanMed
125 #define TROTEC_FAN_HIGH kTrotecFanHigh
126 #define TROTEC_MIN_TEMP kTrotecMinTemp
127 #define TROTEC_MAX_TEMP kTrotecMaxTemp
128 #define TROTEC_MAX_TIMER kTrotecMaxTimer
134 explicit IRTrotecESP(
const uint16_t pin,
const bool inverted =
false,
135 const bool use_modulation =
true);
143 #endif // SEND_TROTEC
152 void setTemp(
const uint8_t celsius);
162 void setMode(
const uint8_t mode);
171 void setRaw(
const uint8_t state[]);
199 explicit IRTrotec3550(
const uint16_t pin,
const bool inverted =
false,
200 const bool use_modulation =
true);
208 #endif // SEND_TROTEC_3550
215 void setTemp(
const uint8_t degrees,
const bool celsius =
true);
219 void setFan(
const uint8_t fan);
220 uint8_t
getFan(
void)
const;
222 void setMode(
const uint8_t mode);
228 void setRaw(
const uint8_t state[]);
251 #endif // IR_TROTEC_H_
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Trotec.cpp:460
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Trotec.cpp:518
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:432
uint8_t Power
Definition: ir_Trotec.h:86
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Trotec.cpp:268
void checksum(void)
Calculate & set the checksum for the current internal state of the remote.
Definition: ir_Trotec.cpp:105
IRTrotec3550(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Trotec.cpp:404
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Trotec.cpp:174
void send(const uint16_t repeat=kTrotecDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Trotec.cpp:414
uint8_t Hours
Definition: ir_Trotec.h:51
const uint16_t kTrotecDefaultRepeat
Definition: IRremoteESP8266.h:1182
uint8_t SwingV
Definition: ir_Trotec.h:85
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Trotec.cpp:475
uint8_t Fan
Definition: ir_Trotec.h:103
uint8_t Sleep
Definition: ir_Trotec.h:43
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
uint8_t TempC
Definition: ir_Trotec.h:89
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Trotec.cpp:492
uint8_t Intro
Definition: ir_Trotec.h:83
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Trotec.cpp:566
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Trotec.cpp:486
void setSwingV(const bool on)
Change the Vertical Swing setting.
Definition: ir_Trotec.cpp:533
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Trotec.cpp:294
void setTimer(const uint16_t mins)
Set the number of minutes of the Timer setting.
Definition: ir_Trotec.cpp:545
void setFan(const uint8_t fan)
Definition: ir_Trotec.h:158
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Trotec.cpp:463
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Trotec.cpp:77
uint8_t Intro1
Definition: ir_Trotec.h:31
const uint8_t kTrotecFanMed
Definition: ir_Trotec.h:69
uint8_t Sum
Definition: ir_Trotec.h:109
uint8_t getTimer(void) const
Get the timer time in nr. of Hours.
Definition: ir_Trotec.cpp:213
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Trotec.cpp:124
const uint8_t kTrotecIntro2
Definition: ir_Trotec.h:61
uint8_t Power
Definition: ir_Trotec.h:37
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Trotec.cpp:482
uint8_t Mode
Definition: ir_Trotec.h:101
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Trotec.cpp:448
Native representation of a Trotec 3550 A/C message.
Definition: ir_Trotec.h:79
const uint8_t kTrotecFanHigh
Definition: ir_Trotec.h:70
Class for sending all basic IR protocols.
Definition: IRsend.h:190
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Trotec.cpp:440
uint16_t getTimer(void) const
Get the number of minutes of the Timer setting.
Definition: ir_Trotec.cpp:541
uint8_t Sum
Definition: ir_Trotec.h:55
std::string String
Definition: IRremoteESP8266.h:1279
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Trotec.cpp:149
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:100
const uint8_t kTrotecMinTemp
Definition: ir_Trotec.h:72
const uint8_t kTrotecDefTemp
Definition: ir_Trotec.h:73
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Trotec.cpp:136
bool getTempUnit(void) const
Get the current temperature unit setting.
Definition: ir_Trotec.cpp:529
const uint8_t kTrotecMaxTimer
Definition: ir_Trotec.h:76
uint8_t Celsius
Definition: ir_Trotec.h:107
bool getSleep(void) const
Get the Sleep setting of the A/C.
Definition: ir_Trotec.cpp:200
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Trotec.cpp:218
Native representation of a Trotec A/C message.
Definition: ir_Trotec.h:27
const uint8_t kTrotecDry
Definition: ir_Trotec.h:65
uint8_t raw[kTrotecStateLength]
Remote state in IR code form.
Definition: ir_Trotec.h:80
const uint8_t kTrotec3550MaxTempF
Definition: ir_Trotec.h:116
void setTemp(const uint8_t celsius)
Set the temperature.
Definition: ir_Trotec.cpp:180
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Trotec.cpp:471
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Trotec.cpp:168
const uint16_t kTrotecStateLength
Definition: IRremoteESP8266.h:1180
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Trotec.cpp:580
uint8_t Temp
Definition: ir_Trotec.h:41
const uint8_t kTrotecMaxTemp
Definition: ir_Trotec.h:74
const uint8_t kTrotecFanLow
Definition: ir_Trotec.h:68
uint8_t TempF
Definition: ir_Trotec.h:94
uint8_t raw[kTrotecStateLength]
Remote state in IR code form.
Definition: ir_Trotec.h:28
void checksum(void)
Calculate & set the checksum for the current internal state of the remote.
Definition: ir_Trotec.cpp:437
const uint8_t kTrotec3550MaxTempC
Definition: ir_Trotec.h:114
IRsend _irsend
Instance of the IR send class.
Definition: ir_Trotec.h:242
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Trotec.cpp:110
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Trotec.h:142
Class for handling detailed Trotec 3550 A/C messages.
Definition: ir_Trotec.h:197
void setTimer(const uint8_t timer)
Set the timer time in nr. of Hours.
Definition: ir_Trotec.cpp:206
uint8_t Mode
Definition: ir_Trotec.h:35
uint8_t getFan(void) const
Definition: ir_Trotec.h:159
void setPower(const bool state)
Change the power setting.
Definition: ir_Trotec.cpp:143
const uint8_t kTrotecFan
Definition: ir_Trotec.h:66
void setRaw(const uint8_t state[])
Set the internal state from a valid code for this protocol.
Definition: ir_Trotec.cpp:455
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Trotec.cpp:245
IRsend _irsend
Instance of the IR send class.
Definition: ir_Trotec.h:185
const uint8_t kTrotecCool
Definition: ir_Trotec.h:64
void setSleep(const bool on)
Set the Sleep setting of the A/C.
Definition: ir_Trotec.cpp:194
uint8_t getSpeed(void) const
Get the current fan speed setting.
Definition: ir_Trotec.cpp:162
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Trotec.cpp:139
uint8_t TimerSet
Definition: ir_Trotec.h:88
uint8_t Intro2
Definition: ir_Trotec.h:33
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Trotec.h:207
TrotecProtocol _
Definition: ir_Trotec.h:191
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kTrotecStateLength)
Calculate the checksum for a given state.
Definition: ir_Trotec.cpp:91
void send(const uint16_t repeat=kTrotecDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Trotec.cpp:82
uint8_t Fan
Definition: ir_Trotec.h:38
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Trotec.cpp:553
void setPower(const bool state)
Change the power setting.
Definition: ir_Trotec.cpp:467
const uint8_t kTrotecAuto
Definition: ir_Trotec.h:63
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kTrotecStateLength)
Calculate the checksum for a given state.
Definition: ir_Trotec.cpp:423
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Trotec.cpp:257
Class for handling detailed Trotec A/C messages.
Definition: ir_Trotec.h:132
Trotec3550Protocol _
Definition: ir_Trotec.h:248
uint8_t TimerHrs
Definition: ir_Trotec.h:91
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Trotec.cpp:603
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Trotec.cpp:629
IRTrotecESP(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Trotec.cpp:72
void setTemp(const uint8_t degrees, const bool celsius=true)
Set the temperature.
Definition: ir_Trotec.cpp:497
uint8_t Timer
Definition: ir_Trotec.h:48
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Trotec.cpp:231
const uint8_t kTrotec3550MinTempF
Definition: ir_Trotec.h:115
Structure to hold a common A/C state.
Definition: IRsend.h:97
bool getSwingV(void) const
Get the value of the current Vertical Swing setting.
Definition: ir_Trotec.cpp:537
const uint8_t kTrotec3550MinTempC
Definition: ir_Trotec.h:113
const uint8_t kTrotecIntro1
Definition: ir_Trotec.h:60
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Trotec.cpp:188
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Trotec.cpp:592
void setRaw(const uint8_t state[])
Set the internal state from a valid code for this protocol.
Definition: ir_Trotec.cpp:131
void setSpeed(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Trotec.cpp:155
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Trotec.cpp:409
void setTempUnit(const bool celsius)
Set the temperature unit that the A/C will use..
Definition: ir_Trotec.cpp:525
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46