IRremoteESP8266: IRHitachiAc424 Class Reference (original) (raw)
Class for handling detailed Hitachi 53-byte/424-bit A/C messages. More...
#include <[ir_Hitachi.h](ir%5F%5FHitachi%5F8h%5Fsource.html)>
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) const |
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) const |
Get the current temperature setting. More... | |
virtual 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... | |
uint8_t | getButton (void) const |
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) const |
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) 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... | |
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... | |
virtual uint8_t | convertFan (const stdAc::fanspeed_t speed) const |
Convert a stdAc::fanspeed_t enum into it's native speed. More... | |
virtual stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed) const |
Convert a native fan speed into its stdAc equivalent. More... | |
virtual stdAc::state_t | toCommon (void) const |
Convert the current internal state into its stdAc::state_t equivalent. More... | |
virtual String | toString (void) const |
Convert the internal state into a human readable string. More... | |
Static Public Member Functions | |
---|---|
static uint8_t | convertMode (const stdAc::opmode_t mode) |
Convert a stdAc::opmode_t enum into its native mode. More... | |
static stdAc::opmode_t | toCommonMode (const uint8_t mode) |
Convert a native mode into its stdAc equivalent. More... | |
Private Member Functions | |
---|---|
void | setInvertedStates (void) |
Update the internal consistency check for the protocol. More... | |
String | _toString (void) const |
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... | |
Hitachi424Protocol | _ |
uint8_t | _previoustemp |
Class for handling detailed Hitachi 53-byte/424-bit A/C messages.
IRHitachiAc424::IRHitachiAc424 ( const uint16_t pin, const bool inverted = false, const bool use_modulation = true ) | explicit |
---|
Class constructor.
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? |
◆ _toString()
String IRHitachiAc424::_toString ( void ) const | private |
---|
Convert the internal state into a human readable string for the settings that are common to protocols of this nature.
Returns
A string containing the common settings in human-readable form.
◆ begin()
void IRHitachiAc424::begin | ( | void | ) |
---|
Set up hardware to be able to send a message.
◆ calibrate()
int8_t IRHitachiAc424::calibrate ( void ) | inline |
---|
Run the calibration to calculate uSec timing offsets for this platform.
Returns
The uSec timing offset needed per modulation of the IR Led.
Note
This will produce a 65ms IR signal pulse at 38kHz. Only ever needs to be run once per object instantiation, if at all.
◆ 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.
Reimplemented in IRHitachiAc264.
◆ 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.
◆ getButton()
uint8_t IRHitachiAc424::getButton | ( | void | ) | const |
---|
Get the Button/Command setting of the A/C.
Returns
The value of the button/command that was pressed.
◆ getFan()
uint8_t IRHitachiAc424::getFan | ( | void | ) | const |
---|
Get the current fan speed setting.
Returns
The current fan speed.
◆ getMode()
uint8_t IRHitachiAc424::getMode | ( | void | ) | const |
---|
Get the operating mode setting of the A/C.
Returns
The current operating mode setting.
◆ getPower()
bool IRHitachiAc424::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 * IRHitachiAc424::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.
◆ getSwingVToggle()
bool IRHitachiAc424::getSwingVToggle | ( | void | ) | const |
---|
Get the Vertical Swing toggle setting of the A/C.
Returns
true, the setting is on. false, the setting is off.
◆ getTemp()
uint8_t IRHitachiAc424::getTemp | ( | void | ) | const |
---|
Get the current temperature setting.
Returns
The current setting for temp. in degrees celsius.
◆ off()
void IRHitachiAc424::off | ( | void | ) |
---|
Change the power setting to Off.
◆ on()
void IRHitachiAc424::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. |
---|
Reimplemented in IRHitachiAc264, and IRHitachiAc344.
◆ setButton()
void IRHitachiAc424::setButton | ( | const uint8_t | button | ) |
---|
Set the Button/Command pressed setting of the A/C.
Parameters
[in] | button | The value of the button/command that was pressed. |
---|
◆ setFan()
void IRHitachiAc424::setFan ( const uint8_t speed) | virtual |
---|
Set the speed of the fan.
Parameters
[in] | speed | The desired setting. |
---|
Reimplemented in IRHitachiAc264.
◆ setInvertedStates()
void IRHitachiAc424::setInvertedStates ( void ) | private |
---|
Update the internal consistency check for the protocol.
◆ setMode()
void IRHitachiAc424::setMode | ( | const uint8_t | mode | ) |
---|
Set the operating mode of the A/C.
Parameters
[in] | mode | The desired operating mode. |
---|
◆ setPower()
void IRHitachiAc424::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 | The length of the new_code array. |
Reimplemented in IRHitachiAc344, and IRHitachiAc264.
◆ setSwingVToggle()
void IRHitachiAc424::setSwingVToggle | ( | const bool | on | ) |
---|
Set the Vertical Swing toggle setting of the A/C.
Parameters
[in] | on | true, the setting is on. false, the setting is off. |
---|
Note
The remote does not keep state of the vertical swing. A byte is sent indicating the swing button is pressed on the remote
◆ setTemp()
void IRHitachiAc424::setTemp | ( | const uint8_t | celsius, |
---|---|---|---|
bool | setPrevious = true | ||
) |
Set the temperature.
Parameters
[in] | celsius | The temperature in degrees celsius. |
---|---|---|
[in] | setPrevious | true, remember this if we change mode. false, don't. |
◆ stateReset()
void IRHitachiAc424::stateReset ( void ) | virtual |
---|
Reset the internal state to a fixed known good state.
Note
Reset to auto fan, cooling, 23° Celsius
Reimplemented in IRHitachiAc264, and IRHitachiAc344.
◆ toCommon()
◆ toCommonFanSpeed()
stdAc::fanspeed_t IRHitachiAc424::toCommonFanSpeed ( const uint8_t speed) const | virtual |
---|
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.
Reimplemented in IRHitachiAc264.
◆ 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 IRHitachiAc424::toString ( void ) const | virtual |
---|
Convert the internal state into a human readable string.
Returns
A string containing the settings in human-readable form.
Reimplemented in IRHitachiAc264, and IRHitachiAc344.
◆ IRHitachiAc264
◆ IRHitachiAc344
◆ _
◆ _irsend
IRsend IRHitachiAc424::_irsend | private |
---|
Instance of the IR send class.
◆ _previoustemp
uint8_t IRHitachiAc424::_previoustemp | private |
---|
The documentation for this class was generated from the following files:
- src/ir_Hitachi.h
- src/ir_Hitachi.cpp