Go to the documentation of this file.
11 #define __STDC_LIMIT_MACROS
19 #include "IRsend_test.h"
96 explicit IRRhossAc(
const uint16_t pin,
const bool inverted =
false,
97 const bool use_modulation =
true);
117 void setTemp(
const uint8_t temp);
119 void setFan(
const uint8_t speed);
120 uint8_t
getFan(
void)
const;
123 void setMode(
const uint8_t mode);
126 void setRaw(
const uint8_t state[]);
145 #endif // IR_RHOSS_H_
const uint8_t kRhossFanMin
Definition: ir_Rhoss.h:63
const uint8_t kRhossTempMin
Definition: ir_Rhoss.h:74
const uint8_t kRhossDefaultFan
Definition: ir_Rhoss.h:85
const uint8_t kRhossSwingOn
Definition: ir_Rhoss.h:82
const uint8_t kRhossTempMax
Definition: ir_Rhoss.h:75
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Rhoss.cpp:191
const uint16_t kRhossStateLength
Definition: IRremoteESP8266.h:1432
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Rhoss.cpp:198
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Rhoss.cpp:281
const uint8_t kRhossModeHeat
Definition: ir_Rhoss.h:67
bool getPower(void) const
Get the power setting from the internal state.
Definition: ir_Rhoss.cpp:185
const uint8_t kRhossDefaultMode
Definition: ir_Rhoss.h:86
Class for handling detailed Rhoss A/C messages.
Definition: ir_Rhoss.h:94
void begin()
Set up hardware to be able to send a message.
Definition: ir_Rhoss.cpp:112
const uint8_t kRhossModeFan
Definition: ir_Rhoss.h:70
uint8_t Swing
Definition: ir_Rhoss.h:41
Class for sending all basic IR protocols.
Definition: IRsend.h:237
const uint8_t kRhossModeAuto
Definition: ir_Rhoss.h:71
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
const bool kRhossDefaultPower
Definition: ir_Rhoss.h:88
const uint8_t kRhossFanMed
Definition: ir_Rhoss.h:64
std::string String
Definition: IRremoteESP8266.h:1521
void setRaw(const uint8_t state[])
Set the raw state of the object.
Definition: ir_Rhoss.cpp:167
const uint8_t kRhossModeCool
Definition: ir_Rhoss.h:68
uint8_t Sum
Definition: ir_Rhoss.h:55
uint8_t Power
Definition: ir_Rhoss.h:43
static bool validChecksum(const uint8_t state[], const uint16_t length=kRhossStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Rhoss.cpp:134
const uint8_t kRhossPowerOn
Definition: ir_Rhoss.h:78
const bool kRhossDefaultSwing
Definition: ir_Rhoss.h:89
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Rhoss.cpp:352
const uint8_t kRhossDefaultTemp
Definition: ir_Rhoss.h:87
IRsend _irsend
Definition: ir_Rhoss.h:136
void checksum(void)
Update the checksum value for the internal state.
Definition: ir_Rhoss.cpp:139
const uint8_t kRhossModeDry
Definition: ir_Rhoss.h:69
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Rhoss.cpp:261
const uint8_t kRhossPowerOff
Definition: ir_Rhoss.h:79
const uint16_t kRhossDefaultRepeat
Definition: IRremoteESP8266.h:1434
const uint8_t kRhossFanAuto
Definition: ir_Rhoss.h:62
void send(const uint16_t repeat=kRhossDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Rhoss.cpp:117
Native representation of a Rhoss A/C message.
Definition: ir_Rhoss.h:24
uint8_t getMode(void) const
Get the current operation mode setting.
Definition: ir_Rhoss.cpp:237
uint8_t Mode
Definition: ir_Rhoss.h:39
const uint8_t kRhossFanMax
Definition: ir_Rhoss.h:65
const uint8_t kRhossSwingOff
Definition: ir_Rhoss.h:83
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Rhoss.cpp:204
void setPower(const bool state)
Set the internal state to have the desired power.
Definition: ir_Rhoss.cpp:179
void on(void)
Set the internal state to have the power on.
Definition: ir_Rhoss.cpp:172
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Rhoss.cpp:299
uint8_t Fan
Definition: ir_Rhoss.h:37
void setSwing(const bool state)
Set the Vertical Swing mode of the A/C.
Definition: ir_Rhoss.cpp:225
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition: ir_Rhoss.cpp:243
uint8_t * getRaw(void)
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
Definition: ir_Rhoss.cpp:160
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kRhossStateLength)
Calculate the checksum for the supplied state.
Definition: ir_Rhoss.cpp:126
IRRhossAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Rhoss.cpp:107
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Rhoss.cpp:219
uint8_t Temp
Definition: ir_Rhoss.h:30
Structure to hold a common A/C state.
Definition: IRsend.h:114
uint8_t getSwing(void) const
Get the Vertical Swing speed of the A/C.
Definition: ir_Rhoss.cpp:231
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Rhoss.cpp:313
void off(void)
Set the internal state to have the power off.
Definition: ir_Rhoss.cpp:175
RhossProtocol _
Definition: ir_Rhoss.h:142
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Rhoss.cpp:326
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Rhoss.h:106
void stateReset()
Reset the internals of the object to a known good state.
Definition: ir_Rhoss.cpp:145
uint8_t raw[kRhossStateLength]
Definition: ir_Rhoss.h:25
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49