Go to the documentation of this file.
24 #include "IRsend_test.h"
120 #define TROTEC_AUTO kTrotecAuto
121 #define TROTEC_COOL kTrotecCool
122 #define TROTEC_DRY kTrotecDry
123 #define TROTEC_FAN kTrotecFan
124 #define TROTEC_FAN_LOW kTrotecFanLow
125 #define TROTEC_FAN_MED kTrotecFanMed
126 #define TROTEC_FAN_HIGH kTrotecFanHigh
127 #define TROTEC_MIN_TEMP kTrotecMinTemp
128 #define TROTEC_MAX_TEMP kTrotecMaxTemp
129 #define TROTEC_MAX_TIMER kTrotecMaxTimer
135 explicit IRTrotecESP(
const uint16_t pin,
const bool inverted =
false,
136 const bool use_modulation =
true);
144 #endif // SEND_TROTEC
153 void setTemp(
const uint8_t celsius);
163 void setMode(
const uint8_t mode);
172 void setRaw(
const uint8_t state[]);
200 explicit IRTrotec3550(
const uint16_t pin,
const bool inverted =
false,
201 const bool use_modulation =
true);
209 #endif // SEND_TROTEC_3550
216 void setTemp(
const uint8_t degrees,
const bool celsius =
true);
220 void setFan(
const uint8_t fan);
221 uint8_t
getFan(
void)
const;
223 void setMode(
const uint8_t mode);
229 void setRaw(
const uint8_t state[]);
252 #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:87
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:52
const uint16_t kTrotecDefaultRepeat
Definition: IRremoteESP8266.h:1414
uint8_t SwingV
Definition: ir_Trotec.h:86
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Trotec.cpp:475
uint8_t Fan
Definition: ir_Trotec.h:104
uint8_t Sleep
Definition: ir_Trotec.h:44
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint8_t TempC
Definition: ir_Trotec.h:90
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:84
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:159
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:32
const uint8_t kTrotecFanMed
Definition: ir_Trotec.h:70
uint8_t Sum
Definition: ir_Trotec.h:110
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:62
uint8_t Power
Definition: ir_Trotec.h:38
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Trotec.cpp:482
uint8_t Mode
Definition: ir_Trotec.h:102
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:80
const uint8_t kTrotecFanHigh
Definition: ir_Trotec.h:71
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
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:56
std::string String
Definition: IRremoteESP8266.h:1521
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:73
const uint8_t kTrotecDefTemp
Definition: ir_Trotec.h:74
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:77
uint8_t Celsius
Definition: ir_Trotec.h:108
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:28
const uint8_t kTrotecDry
Definition: ir_Trotec.h:66
uint8_t raw[kTrotecStateLength]
Remote state in IR code form.
Definition: ir_Trotec.h:81
const uint8_t kTrotec3550MaxTempF
Definition: ir_Trotec.h:117
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:1412
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:42
const uint8_t kTrotecMaxTemp
Definition: ir_Trotec.h:75
const uint8_t kTrotecFanLow
Definition: ir_Trotec.h:69
uint8_t TempF
Definition: ir_Trotec.h:95
uint8_t raw[kTrotecStateLength]
Remote state in IR code form.
Definition: ir_Trotec.h:29
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:115
IRsend _irsend
Instance of the IR send class.
Definition: ir_Trotec.h:243
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:143
Class for handling detailed Trotec 3550 A/C messages.
Definition: ir_Trotec.h:198
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:36
uint8_t getFan(void) const
Definition: ir_Trotec.h:160
void setPower(const bool state)
Change the power setting.
Definition: ir_Trotec.cpp:143
const uint8_t kTrotecFan
Definition: ir_Trotec.h:67
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:186
const uint8_t kTrotecCool
Definition: ir_Trotec.h:65
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:89
uint8_t Intro2
Definition: ir_Trotec.h:34
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Trotec.h:208
TrotecProtocol _
Definition: ir_Trotec.h:192
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:39
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:64
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:133
Trotec3550Protocol _
Definition: ir_Trotec.h:249
uint8_t TimerHrs
Definition: ir_Trotec.h:92
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:49
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:116
Structure to hold a common A/C state.
Definition: IRsend.h:114
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:114
const uint8_t kTrotecIntro1
Definition: ir_Trotec.h:61
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:49