IRremoteESP8266
Public Member Functions | Static Public Member Functions | List of all members
IRHitachiAc344 Class Reference

Class for handling detailed Hitachi 344-bit A/C messages. More...

#include <ir_Hitachi.h>

Inheritance diagram for IRHitachiAc344:
Inheritance graph
[legend]
Collaboration diagram for IRHitachiAc344:
Collaboration graph
[legend]

Public Member Functions

 IRHitachiAc344 (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
 Class constructor for handling detailed Hitachi_AC344 43 byte A/C messages. More...
 
void stateReset (void) override
 Reset the internal state to auto fan, cooling, 23° Celsius. More...
 
void setRaw (const uint8_t new_code[], const uint16_t length=kHitachiAc344StateLength) override
 Set the internal state from a valid code for this protocol. More...
 
stdAc::state_t toCommon (void) const override
 Convert the current internal state into its stdAc::state_t equivalent. More...
 
void send (const uint16_t repeat=kHitachiAcDefaultRepeat) override
 Create and send the IR message to the A/C. More...
 
void setSwingV (const bool on)
 Control the vertical swing setting. More...
 
bool getSwingV (void) const
 Get the current vertical swing setting. More...
 
void setSwingH (const uint8_t position)
 Control the horizontal swing setting. More...
 
uint8_t getSwingH (void) const
 Get the current horizontal swing setting. More...
 
String toString (void) const override
 Convert the internal state into a human readable string. More...
 
- Public Member Functions inherited from IRHitachiAc424
 IRHitachiAc424 (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
 Class constructor. 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...
 
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...
 

Static Public Member Functions

static uint8_t convertSwingH (const stdAc::swingh_t position)
 Convert a standard A/C horizontal swing into its native setting. More...
 
static stdAc::swingh_t toCommonSwingH (const uint8_t pos)
 Convert a native horizontal swing postion to it's common equivalent. More...
 
- Static Public Member Functions inherited from IRHitachiAc424
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...
 

Detailed Description

Class for handling detailed Hitachi 344-bit A/C messages.

Constructor & Destructor Documentation

◆ IRHitachiAc344()

IRHitachiAc344::IRHitachiAc344 ( const uint16_t  pin,
const bool  inverted = false,
const bool  use_modulation = true 
)
explicit

Class constructor for handling detailed Hitachi_AC344 43 byte A/C messages.

Parameters
[in]pinGPIO to be used when sending.
[in]invertedIs the output signal to be inverted?
[in]use_modulationIs frequency modulation to be used?

Member Function Documentation

◆ convertSwingH()

uint8_t IRHitachiAc344::convertSwingH ( const stdAc::swingh_t  position)
static

Convert a standard A/C horizontal swing into its native setting.

Parameters
[in]positionA stdAc::swingh_t position to convert.
Returns
The equivilent native horizontal swing position.

◆ getSwingH()

uint8_t IRHitachiAc344::getSwingH ( void  ) const

Get the current horizontal swing setting.

Returns
The current position horizontal swing is set to.

◆ getSwingV()

bool IRHitachiAc344::getSwingV ( void  ) const

Get the current vertical swing setting.

Returns
True, if the setting is on. False, it is off.

◆ send()

void IRHitachiAc344::send ( const uint16_t  repeat = kHitachiAcDefaultRepeat)
overridevirtual

Create and send the IR message to the A/C.

Parameters
[in]repeatNr. of times to repeat the message.

Reimplemented from IRHitachiAc424.

◆ setRaw()

void IRHitachiAc344::setRaw ( const uint8_t  new_code[],
const uint16_t  length = kHitachiAc344StateLength 
)
overridevirtual

Set the internal state from a valid code for this protocol.

Parameters
[in]new_codeA valid code for this protocol.
[in]lengthSize (in bytes) of the code for this protocol.

Reimplemented from IRHitachiAc424.

◆ setSwingH()

void IRHitachiAc344::setSwingH ( const uint8_t  position)

Control the horizontal swing setting.

Parameters
[in]positionThe position to set the horizontal swing to.

◆ setSwingV()

void IRHitachiAc344::setSwingV ( const bool  on)

Control the vertical swing setting.

Parameters
[in]onTrue, turns on the feature. False, turns off the feature.

◆ stateReset()

void IRHitachiAc344::stateReset ( void  )
overridevirtual

Reset the internal state to auto fan, cooling, 23° Celsius.

Reimplemented from IRHitachiAc424.

◆ toCommon()

stdAc::state_t IRHitachiAc344::toCommon ( void  ) const
overridevirtual

Convert the current internal state into its stdAc::state_t equivalent.

Returns
The stdAc equivalent of the native settings.

Reimplemented from IRHitachiAc424.

◆ toCommonSwingH()

stdAc::swingh_t IRHitachiAc344::toCommonSwingH ( const uint8_t  pos)
static

Convert a native horizontal swing postion to it's common equivalent.

Parameters
[in]posA native position to convert.
Returns
The common horizontal swing position.

◆ toString()

String IRHitachiAc344::toString ( void  ) const
overridevirtual

Convert the internal state into a human readable string.

Returns
A string containing the settings in human-readable form.

Reimplemented from IRHitachiAc424.


The documentation for this class was generated from the following files: