IRremoteESP8266: IRHitachiAc296 Class Reference (original) (raw)
#include <[ir_Hitachi.h](ir%5F%5FHitachi%5F8h%5Fsource.html)>
Public Member Functions | |
---|---|
IRHitachiAc296 (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
void | stateReset (void) |
Reset the internal state to auto fan, heating, & 24° Celsius. More... | |
void | send (const uint16_t repeat=kHitachiAcDefaultRepeat) |
Send the current internal state as an IR message. More... | |
void | begin (void) |
Set up hardware to be able to send a message. More... | |
void | on (void) |
Change the power setting to On. More... | |
void | off (void) |
Change the power setting to Off. More... | |
void | setPower (const bool on) |
Change the power setting. More... | |
bool | getPower (void) const |
Get the value of the current power setting. More... | |
void | setTemp (const uint8_t temp) |
Set the temperature. More... | |
uint8_t | getTemp (void) const |
Get the current temperature setting. More... | |
void | setFan (const uint8_t speed) |
Set the speed of the fan. More... | |
uint8_t | getFan (void) const |
Get the current fan speed setting. More... | |
void | setMode (const uint8_t mode) |
Set the operating mode of the A/C. More... | |
uint8_t | getMode (void) const |
Get the operating mode setting of the A/C. More... | |
uint8_t * | getRaw (void) |
Get a PTR to the internal state/code for this protocol. More... | |
void | setRaw (const uint8_t new_code[], const uint16_t length=kHitachiAc296StateLength) |
Set the internal state from a valid code for this protocol. More... | |
stdAc::state_t | toCommon (void) const |
Convert the current internal state into its stdAc::state_t equivalent. More... | |
String | toString (void) const |
Convert the current internal state into a human readable string. More... | |
Static Public Member Functions | |
---|---|
static bool | hasInvertedStates (const uint8_t state[], const uint16_t length) |
Check if every second byte of the state, after the fixed header is inverted to the previous byte. More... | |
static uint8_t | convertMode (const stdAc::opmode_t mode) |
Convert a stdAc::opmode_t enum into its native mode. More... | |
static uint8_t | convertFan (const stdAc::fanspeed_t speed) |
Convert a stdAc::fanspeed_t enum into it's native speed. More... | |
static stdAc::opmode_t | toCommonMode (const uint8_t mode) |
Convert a native mode into its stdAc equivalent. More... | |
static stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed) |
Convert a native fan speed into its stdAc equivalent. More... | |
Private Attributes | |
---|---|
IRsend | _irsend |
Instance of the IR send class. More... | |
HitachiAC296Protocol | _ |
IRHitachiAc296::IRHitachiAc296 ( const uint16_t pin, const bool inverted = false, const bool use_modulation = true ) | explicit |
---|
Parameters
[in] | pin | GPIO to be used when sending. |
---|---|---|
[in] | inverted | Is the output signal to be inverted? |
[in] | use_modulation | Is frequency modulation to be used? |
◆ begin()
void IRHitachiAc296::begin | ( | void | ) |
---|
Set up hardware to be able to send a message.
◆ convertFan()
Convert a stdAc::fanspeed_t enum into it's native speed.
Parameters
[in] | speed | The enum to be converted. |
---|
Returns
The native equivalent of the enum.
◆ convertMode()
Convert a stdAc::opmode_t enum into its native mode.
Parameters
[in] | mode | The enum to be converted. |
---|
Returns
The native equivalent of the enum.
◆ getFan()
uint8_t IRHitachiAc296::getFan | ( | void | ) | const |
---|
Get the current fan speed setting.
Returns
The current fan speed.
◆ getMode()
uint8_t IRHitachiAc296::getMode | ( | void | ) | const |
---|
Get the operating mode setting of the A/C.
Returns
The current operating mode setting.
◆ getPower()
bool IRHitachiAc296::getPower | ( | void | ) | const |
---|
Get the value of the current power setting.
Returns
true, the setting is on. false, the setting is off.
◆ getRaw()
uint8_t * IRHitachiAc296::getRaw | ( | void | ) |
---|
Get a PTR to the internal state/code for this protocol.
Returns
PTR to a code for this protocol based on the current internal state.
◆ getTemp()
uint8_t IRHitachiAc296::getTemp | ( | void | ) | const |
---|
Get the current temperature setting.
Returns
The current setting for temp. in degrees celsius.
◆ hasInvertedStates()
bool IRHitachiAc296::hasInvertedStates ( const uint8_t _state_[], const uint16_t length ) | static |
---|
Check if every second byte of the state, after the fixed header is inverted to the previous byte.
Parameters
[in] | state | The state array to be checked. |
---|---|---|
[in] | length | The size of the state array. |
Note
This is this protocols integrity check.
◆ off()
void IRHitachiAc296::off | ( | void | ) |
---|
Change the power setting to Off.
◆ on()
void IRHitachiAc296::on | ( | void | ) |
---|
Change the power setting to On.
◆ send()
Send the current internal state as an IR message.
Parameters
[in] | repeat | Nr. of times the message will be repeated. |
---|
◆ setFan()
void IRHitachiAc296::setFan | ( | const uint8_t | speed | ) |
---|
Set the speed of the fan.
Parameters
[in] | speed | The desired setting. |
---|
◆ setInvertedStates()
void IRHitachiAc296::setInvertedStates ( void ) | private |
---|
Update the internal consistency check for the protocol.
◆ setMode()
void IRHitachiAc296::setMode | ( | const uint8_t | mode | ) |
---|
Set the operating mode of the A/C.
Parameters
[in] | mode | The desired operating mode. |
---|
◆ setPower()
void IRHitachiAc296::setPower | ( | const bool | on | ) |
---|
Change the power setting.
Parameters
[in] | on | true, the setting is on. false, the setting is off. |
---|
◆ setRaw()
Set the internal state from a valid code for this protocol.
Parameters
[in] | new_code | A valid code for this protocol. |
---|---|---|
[in] | length | Size (in bytes) of the code for this protocol. |
◆ setTemp()
void IRHitachiAc296::setTemp | ( | const uint8_t | celsius | ) |
---|
Set the temperature.
Parameters
[in] | celsius | The temperature in degrees celsius. |
---|
◆ stateReset()
void IRHitachiAc296::stateReset | ( | void | ) |
---|
Reset the internal state to auto fan, heating, & 24° Celsius.
◆ toCommon()
Convert the current internal state into its stdAc::state_t equivalent.
Returns
The stdAc equivalent of the native settings.
◆ toCommonFanSpeed()
Convert a native fan speed into its stdAc equivalent.
Parameters
[in] | speed | The native setting to be converted. |
---|
Returns
The stdAc equivalent of the native setting.
◆ toCommonMode()
Convert a native mode into its stdAc equivalent.
Parameters
[in] | mode | The native setting to be converted. |
---|
Returns
The stdAc equivalent of the native setting.
◆ toString()
String IRHitachiAc296::toString | ( | void | ) | const |
---|
Convert the current internal state into a human readable string.
Returns
A human readable string.
◆ _
◆ _irsend
IRsend IRHitachiAc296::_irsend | private |
---|
Instance of the IR send class.
The documentation for this class was generated from the following files:
- src/ir_Hitachi.h
- src/ir_Hitachi.cpp