IRremoteESP8266
|
Class for handling detailed Hitachi 53-byte/424-bit A/C messages. More...
#include <ir_Hitachi.h>
Public Member Functions | |
IRHitachiAc424 (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
Class constructor. More... | |
virtual void | stateReset (void) |
Reset the internal state to a fixed known good state. More... | |
virtual void | send (const uint16_t repeat=kHitachiAcDefaultRepeat) |
Send the current internal state as an IR message. More... | |
int8_t | calibrate (void) |
Run the calibration to calculate uSec timing offsets for this platform. 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) |
Get the value of the current power setting. More... | |
void | setTemp (const uint8_t temp, bool setPrevious=true) |
Set the temperature. More... | |
uint8_t | getTemp (void) |
Get the current temperature setting. More... | |
void | setFan (const uint8_t speed) |
Set the speed of the fan. More... | |
uint8_t | getFan (void) |
Get the current fan speed setting. More... | |
uint8_t | getButton (void) |
Get the Button/Command setting of the A/C. More... | |
void | setButton (const uint8_t button) |
Set the Button/Command pressed setting of the A/C. More... | |
void | setSwingVToggle (const bool on) |
Set the Vertical Swing toggle setting of the A/C. More... | |
bool | getSwingVToggle (void) |
Get the Vertical Swing toggle setting of the A/C. More... | |
void | setMode (const uint8_t mode) |
Set the operating mode of the A/C. More... | |
uint8_t | getMode (void) |
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... | |
virtual void | setRaw (const uint8_t new_code[], const uint16_t length=kHitachiAc424StateLength) |
Set the internal state from a valid code for this protocol. More... | |
uint8_t | convertMode (const stdAc::opmode_t mode) |
Convert a stdAc::opmode_t enum into its native mode. More... | |
uint8_t | convertFan (const stdAc::fanspeed_t speed) |
Convert a stdAc::fanspeed_t enum into it's native speed. More... | |
virtual stdAc::state_t | toCommon (void) |
Convert the current internal state into its stdAc::state_t equivilant. More... | |
String | toString (void) |
Convert the internal state into a human readable string. More... | |
Static Public Member Functions | |
static stdAc::opmode_t | toCommonMode (const uint8_t mode) |
Convert a native mode into its stdAc equivilant. More... | |
static stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed) |
Convert a native fan speed into its stdAc equivilant. More... | |
Private Member Functions | |
void | setInvertedStates (void) |
Update the internal consistency check for the protocol. More... | |
String | _toString (void) |
Convert the internal state into a human readable string for the settings that are common to protocols of this nature. More... | |
Private Attributes | |
IRsend | _irsend |
Instance of the IR send class. More... | |
uint8_t | remote_state [kHitachiAc424StateLength] |
The state in native code. More... | |
uint8_t | _previoustemp |
Friends | |
class | IRHitachiAc344 |
Class for handling detailed Hitachi 53-byte/424-bit A/C messages.
|
explicit |
Class constructor.
[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? |
|
private |
Convert the internal state into a human readable string for the settings that are common to protocols of this nature.
void IRHitachiAc424::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
uint8_t IRHitachiAc424::convertFan | ( | const stdAc::fanspeed_t | speed | ) |
Convert a stdAc::fanspeed_t enum into it's native speed.
[in] | speed | The enum to be converted. |
uint8_t IRHitachiAc424::convertMode | ( | const stdAc::opmode_t | mode | ) |
Convert a stdAc::opmode_t enum into its native mode.
[in] | mode | The enum to be converted. |
uint8_t IRHitachiAc424::getButton | ( | void | ) |
Get the Button/Command setting of the A/C.
uint8_t IRHitachiAc424::getFan | ( | void | ) |
Get the current fan speed setting.
uint8_t IRHitachiAc424::getMode | ( | void | ) |
Get the operating mode setting of the A/C.
bool IRHitachiAc424::getPower | ( | void | ) |
Get the value of the current power setting.
uint8_t * IRHitachiAc424::getRaw | ( | void | ) |
Get a PTR to the internal state/code for this protocol.
bool IRHitachiAc424::getSwingVToggle | ( | void | ) |
Get the Vertical Swing toggle setting of the A/C.
uint8_t IRHitachiAc424::getTemp | ( | void | ) |
Get the current temperature setting.
void IRHitachiAc424::off | ( | void | ) |
Change the power setting to Off.
void IRHitachiAc424::on | ( | void | ) |
Change the power setting to On.
|
virtual |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
Reimplemented in IRHitachiAc344.
void IRHitachiAc424::setButton | ( | const uint8_t | button | ) |
Set the Button/Command pressed setting of the A/C.
[in] | button | The value of the button/command that was pressed. |
void IRHitachiAc424::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
[in] | speed | The desired setting. |
|
private |
Update the internal consistency check for the protocol.
void IRHitachiAc424::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
[in] | mode | The desired operating mode. |
void IRHitachiAc424::setPower | ( | const bool | on | ) |
Change the power setting.
[in] | on | true, the setting is on. false, the setting is off. |
|
virtual |
Set the internal state from a valid code for this protocol.
[in] | new_code | A valid code for this protocol. |
[in] | length | The length of the new_code array. |
Reimplemented in IRHitachiAc344.
void IRHitachiAc424::setSwingVToggle | ( | const bool | on | ) |
Set the Vertical Swing toggle setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRHitachiAc424::setTemp | ( | const uint8_t | celsius, |
bool | setPrevious = true |
||
) |
Set the temperature.
[in] | celsius | The temperature in degrees celsius. |
[in] | setPrevious | true, remember this if we change mode. false, don't. |
|
virtual |
Reset the internal state to a fixed known good state.
Reimplemented in IRHitachiAc344.
|
virtual |
Convert the current internal state into its stdAc::state_t equivilant.
Reimplemented in IRHitachiAc344.
|
static |
|
static |
String IRHitachiAc424::toString | ( | void | ) |
Convert the internal state into a human readable string.
|
friend |
|
private |
Instance of the IR send class.
|
private |
|
private |
The state in native code.