Go to the documentation of this file.
11 #ifndef IR_GOODWEATHER_H_
12 #define IR_GOODWEATHER_H_
14 #define __STDC_LIMIT_MACROS
22 #include "IRsend_test.h"
92 explicit IRGoodweatherAc(
const uint16_t pin,
const bool inverted =
false,
93 const bool use_modulation =
true);
102 #endif // SEND_GOODWEATHER
108 void setTemp(
const uint8_t temp);
110 void setFan(
const uint8_t speed);
112 void setMode(
const uint8_t mode);
125 void setRaw(
const uint64_t state);
144 #endif // IR_GOODWEATHER_H_
const uint8_t kGoodweatherBitTurbo
Definition: ir_Goodweather.h:37
const uint8_t kGoodweatherCmdLight
Definition: ir_Goodweather.h:83
const uint8_t kGoodweatherCmdDownTemp
Definition: ir_Goodweather.h:75
void off(void)
Change the power setting to Off.
Definition: ir_Goodweather.cpp:96
void on(void)
Change the power setting to On.
Definition: ir_Goodweather.cpp:93
const uint16_t kGoodweatherOneSpace
Definition: ir_Goodweather.h:29
const uint8_t kGoodweatherCommandSize
Definition: ir_Goodweather.h:39
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Goodweather.cpp:71
const uint8_t kGoodweatherTempMin
Definition: ir_Goodweather.h:69
bool getLight(void)
Get the Light (LED) Toggle setting of the A/C.
Definition: ir_Goodweather.cpp:184
IRsend _irsend
Instance of the IR send class.
Definition: ir_Goodweather.h:136
const uint8_t kGoodweatherCmdPower
Definition: ir_Goodweather.h:72
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:70
stdAc::state_t toCommon(void)
Convert the current internal state into its stdAc::state_t equivilant.
Definition: ir_Goodweather.cpp:317
const uint8_t kGoodweatherCmdAirFlow
Definition: ir_Goodweather.h:79
bool getTurbo(void)
Get the Turbo Toggle setting of the A/C.
Definition: ir_Goodweather.cpp:210
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
const uint8_t kGoodweatherFanSize
Definition: ir_Goodweather.h:46
void setTurbo(const bool toggle)
Set the Turbo Toggle setting of the A/C.
Definition: ir_Goodweather.cpp:203
bool getSleep(void)
Get the Sleep Toggle setting of the A/C.
Definition: ir_Goodweather.cpp:197
void setLight(const bool toggle)
Set the Light (LED) Toggle setting of the A/C.
Definition: ir_Goodweather.cpp:177
const uint8_t kGoodweatherBitMode
Definition: ir_Goodweather.h:49
const uint8_t kGoodweatherCmdSwing
Definition: ir_Goodweather.h:76
const uint8_t kGoodweatherFanMed
Definition: ir_Goodweather.h:66
uint8_t convertSwingV(const stdAc::swingv_t swingv)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Goodweather.cpp:278
const uint8_t kGoodweatherCmdUpTemp
Definition: ir_Goodweather.h:74
const uint16_t kGoodweatherHdrSpace
Definition: ir_Goodweather.h:32
const uint64_t kGoodweatherEOFMask
Definition: ir_Goodweather.h:51
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Goodweather.h:101
Class for sending all basic IR protocols.
Definition: IRsend.h:176
const uint8_t kGoodweatherFanAuto
Definition: ir_Goodweather.h:64
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
IRGoodweatherAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Goodweather.cpp:66
const uint16_t kGoodweatherZeroSpace
Definition: ir_Goodweather.h:30
void setRaw(const uint64_t state)
Set the internal state from a valid code for this protocol.
Definition: ir_Goodweather.cpp:90
const uint8_t kGoodweatherAuto
Definition: ir_Goodweather.h:54
std::string String
Definition: IRremoteESP8266.h:1128
void send(const uint16_t repeat=kGoodweatherMinRepeat)
Send the current internal state as an IR message.
Definition: ir_Goodweather.cpp:79
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivilant.
Definition: ir_Goodweather.cpp:293
const uint8_t kGoodweatherExtraTolerance
Definition: ir_Goodweather.h:33
const uint8_t kGoodweatherSwingSlow
Definition: ir_Goodweather.h:61
const uint8_t kGoodweatherTempSize
Definition: ir_Goodweather.h:48
const uint8_t kGoodweatherSwingOff
Definition: ir_Goodweather.h:62
const uint8_t kGoodweatherDry
Definition: ir_Goodweather.h:56
const uint8_t kGoodweatherSwingFast
Definition: ir_Goodweather.h:60
const uint8_t kGoodweatherBitFan
Definition: ir_Goodweather.h:45
const uint8_t kGoodweatherCmdSleep
Definition: ir_Goodweather.h:81
const uint8_t kGoodweatherCool
Definition: ir_Goodweather.h:55
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Goodweather.cpp:113
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Goodweather.cpp:74
const uint8_t kGoodweatherBitEOF
Definition: ir_Goodweather.h:50
const uint8_t kGoodweatherCmdFan
Definition: ir_Goodweather.h:77
bool getPower(void)
Get the value of the current power setting.
Definition: ir_Goodweather.cpp:107
const uint8_t kGoodweatherCmdHold
Definition: ir_Goodweather.h:80
void setSwing(const uint8_t speed)
Set the Vertical Swing speed of the A/C.
Definition: ir_Goodweather.cpp:216
const uint8_t kGoodweatherFan
Definition: ir_Goodweather.h:57
const uint8_t kGoodweatherCmdTurbo
Definition: ir_Goodweather.h:82
void setCommand(const uint8_t cmd)
Set the remote Command type/button pressed.
Definition: ir_Goodweather.cpp:237
uint8_t getFan(void)
Get the current fan speed setting.
Definition: ir_Goodweather.cpp:147
const uint8_t kGoodweatherBitSwing
Definition: ir_Goodweather.h:42
const uint64_t kGoodweatherStateInit
Definition: ir_Goodweather.h:85
const uint8_t kGoodweatherCmdTimer
Definition: ir_Goodweather.h:78
const uint8_t kGoodweatherBitSleep
Definition: ir_Goodweather.h:40
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Goodweather.cpp:153
const uint8_t kGoodweatherBitLight
Definition: ir_Goodweather.h:36
const uint8_t kGoodweatherTempMax
Definition: ir_Goodweather.h:70
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivilant.
Definition: ir_Goodweather.cpp:306
uint8_t getCommand(void)
Get the Command type/button pressed from the current settings.
Definition: ir_Goodweather.cpp:244
const uint8_t kGoodweatherFanLow
Definition: ir_Goodweather.h:67
uint8_t getTemp(void)
Get the current temperature setting.
Definition: ir_Goodweather.cpp:124
String toString()
Convert the current internal state into a human readable string.
Definition: ir_Goodweather.cpp:344
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Goodweather.cpp:131
const uint8_t kGoodweatherHeat
Definition: ir_Goodweather.h:58
const uint16_t kGoodweatherBitMark
Definition: ir_Goodweather.h:28
uint64_t remote
The state of the IR remote in IR code form.
Definition: ir_Goodweather.h:142
const uint8_t kGoodweatherFanHigh
Definition: ir_Goodweather.h:65
uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Goodweather.cpp:264
uint8_t getMode()
Get the operating mode setting of the A/C.
Definition: ir_Goodweather.cpp:171
uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Goodweather.cpp:251
const uint16_t kGoodweatherHdrMark
Definition: ir_Goodweather.h:31
const uint8_t kGoodweatherSwingSize
Definition: ir_Goodweather.h:43
const uint8_t kGoodweatherBitAirFlow
Definition: ir_Goodweather.h:44
void setPower(const bool on)
Change the power setting.
Definition: ir_Goodweather.cpp:100
void setSleep(const bool toggle)
Set the Sleep Toggle setting of the A/C.
Definition: ir_Goodweather.cpp:190
Structure to hold a common A/C state.
Definition: IRsend.h:97
Class for handling detailed Goodweather A/C messages.
Definition: ir_Goodweather.h:90
const uint8_t kGoodweatherBitCommand
Definition: ir_Goodweather.h:38
const uint8_t kGoodweatherBitPower
Definition: ir_Goodweather.h:41
const uint8_t kGoodweatherBitTemp
Definition: ir_Goodweather.h:47
uint64_t getRaw(void)
Get a copy of the internal state as a valid code for this protocol.
Definition: ir_Goodweather.cpp:86
const uint16_t kGoodweatherMinRepeat
Definition: IRremoteESP8266.h:907
const uint8_t kGoodweatherCmdMode
Definition: ir_Goodweather.h:73
uint8_t getSwing(void)
Get the Vertical Swing speed of the A/C.
Definition: ir_Goodweather.cpp:231
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46