Go to the documentation of this file.
58 #ifndef IR_TRANSCOLD_H_
59 #define IR_TRANSCOLD_H_
61 #define __STDC_LIMIT_MACROS
69 #include "IRsend_test.h"
122 explicit IRTranscoldAc(
const uint16_t pin,
const bool inverted =
false,
123 const bool use_modulation =
true);
132 #endif // SEND_TRANSCOLD
138 void setTemp(
const uint8_t temp);
140 void setFan(
const uint8_t speed,
const bool modecheck =
true);
141 uint8_t
getFan(
void)
const;
142 void setMode(
const uint8_t mode);
146 uint32_t
getRaw(
void)
const;
147 void setRaw(
const uint32_t new_code);
174 #endif // IR_TRANSCOLD_H_
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode to it's common stdAc::opmode_t equivalent.
Definition: ir_Transcold.cpp:316
const uint8_t kTranscoldFanFixed
Definition: ir_Transcold.h:100
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_Transcold.cpp:388
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Transcold.cpp:88
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Transcold.cpp:79
const uint32_t kTranscoldSwing
Definition: ir_Transcold.h:111
IRTranscoldAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Transcold.cpp:74
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
const uint8_t kTranscoldFanMed
Definition: ir_Transcold.h:95
const uint32_t kTranscoldOff
Definition: ir_Transcold.h:110
bool getSwing(void) const
Get the Swing setting of the A/C.
Definition: ir_Transcold.cpp:201
const uint8_t kTranscoldUnknown
Definition: ir_Transcold.h:109
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Transcold.cpp:213
uint32_t raw
The state of the IR remote in IR code form.
Definition: ir_Transcold.h:74
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Transcold.cpp:329
const uint32_t kTranscoldSwingH
Definition: ir_Transcold.h:112
void setRaw(const uint32_t new_code)
Set the internal state from a valid code for this protocol.
Definition: ir_Transcold.cpp:114
const uint16_t kTranscoldDefaultRepeat
Definition: IRremoteESP8266.h:1411
void setPower(const bool state)
Change the power setting.
Definition: ir_Transcold.cpp:185
const uint8_t kTranscoldPrefix
Definition: ir_Transcold.h:108
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 setFan(const uint8_t speed, const bool modecheck=true)
Set the speed of the fan.
Definition: ir_Transcold.cpp:256
void on(void)
Change the power setting to On.
Definition: ir_Transcold.cpp:194
std::string String
Definition: IRremoteESP8266.h:1521
const uint8_t kTranscoldCool
Definition: ir_Transcold.h:87
const uint8_t kTranscoldHeat
Definition: ir_Transcold.h:90
const uint8_t kTranscoldFanAuto0
Definition: ir_Transcold.h:98
bool handleSpecialState(const uint32_t data)
Adjust any internal settings based on the type of special state we are supplied. Does nothing if it i...
Definition: ir_Transcold.cpp:146
uint32_t getRaw(void) const
Get a copy of the internal state as a valid code for this protocol.
Definition: ir_Transcold.cpp:105
bool swingHFlag
Definition: ir_Transcold.h:165
const uint8_t kTranscoldFanZoneFollow
Definition: ir_Transcold.h:99
uint8_t Mode
Definition: ir_Transcold.h:78
TranscoldProtocol _
Definition: ir_Transcold.h:168
IRsend _irsend
Instance of the IR send class.
Definition: ir_Transcold.h:157
const uint8_t kTranscoldTempSize
Definition: ir_Transcold.h:106
bool isSpecialState(void) const
Is the current state is a special state?
Definition: ir_Transcold.cpp:132
const uint32_t kTranscoldKnownGoodState
Definition: ir_Transcold.h:116
const uint8_t kTranscoldFanAuto
Definition: ir_Transcold.h:97
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Transcold.cpp:161
Native representation of a Transcold A/C message.
Definition: ir_Transcold.h:73
bool swingFlag
Definition: ir_Transcold.h:164
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Transcold.cpp:178
const uint8_t kTranscoldFanTempCode
Definition: ir_Transcold.h:105
const uint8_t kTranscoldFanMax
Definition: ir_Transcold.h:96
void off(void)
Change the power setting to Off.
Definition: ir_Transcold.cpp:197
void setSwing(void)
Toggle the Swing mode of the A/C.
Definition: ir_Transcold.cpp:204
const uint8_t kTranscoldTempMin
Definition: ir_Transcold.h:103
bool swingVFlag
Definition: ir_Transcold.h:166
uint8_t Temp
Definition: ir_Transcold.h:77
stdAc::state_t toCommon(const stdAc::state_t *prev=NULL) const
Convert the A/C state to it's common stdAc::state_t equivalent.
Definition: ir_Transcold.cpp:341
Class for handling detailed Transcold A/C messages.
Definition: ir_Transcold.h:120
const uint32_t kTranscoldSwingV
Definition: ir_Transcold.h:113
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Transcold.cpp:249
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Transcold.cpp:302
uint32_t special_state
special mode.
Definition: ir_Transcold.h:169
const uint8_t kTranscoldAuto
Definition: ir_Transcold.h:89
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Transcold.cpp:171
void send(const uint16_t repeat=kTranscoldDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Transcold.cpp:93
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a standard A/C mode into its native mode.
Definition: ir_Transcold.cpp:289
const uint32_t kTranscoldCmdFan
Definition: ir_Transcold.h:114
const uint8_t kTranscoldFanMin
Definition: ir_Transcold.h:94
const uint8_t kTranscoldFan
Definition: ir_Transcold.h:91
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Transcold.cpp:240
const uint8_t kTranscoldTempMax
Definition: ir_Transcold.h:104
Structure to hold a common A/C state.
Definition: IRsend.h:114
const uint8_t kTranscoldDry
Definition: ir_Transcold.h:88
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Transcold.h:131
uint8_t Fan
Definition: ir_Transcold.h:79
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49