IRremoteESP8266
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
IRAirwellAc Class Reference

Class for handling detailed Airwell A/C messages. More...

#include <ir_Airwell.h>

Collaboration diagram for IRAirwellAc:
Collaboration graph
[legend]

Public Member Functions

 IRAirwellAc (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
 Class constructor. More...
 
void stateReset ()
 Reset the internals of the object to a known good state. More...
 
void send (const uint16_t repeat=kAirwellMinRepeats)
 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 ()
 Set up hardware to be able to send a message. More...
 
void setPowerToggle (const bool on)
 Turn on/off the Power Airwell setting. More...
 
bool getPowerToggle () const
 Get the power toggle setting from the internal state. More...
 
void setTemp (const uint8_t temp)
 Set the temperature. More...
 
uint8_t getTemp () const
 Get the current temperature setting. More...
 
void setFan (const uint8_t speed)
 Set the speed of the fan. More...
 
uint8_t getFan () const
 Get the current fan speed setting. More...
 
void setMode (const uint8_t mode)
 Set the desired operation mode. More...
 
uint8_t getMode () const
 Get the current operation mode setting. More...
 
uint64_t getRaw () const
 Get the raw state of the object, suitable to be sent with the appropriate IRsend object method. More...
 
void setRaw (const uint64_t state)
 Set the raw state of the object. More...
 
stdAc::state_t toCommon (void) const
 Convert the current internal state into its stdAc::state_t equivilant. More...
 
String toString () const
 Convert the current 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 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 equivilant. More...
 
static stdAc::fanspeed_t toCommonFanSpeed (const uint8_t speed)
 Convert a native fan speed into its stdAc equivilant. More...
 

Private Attributes

IRsend _irsend
 Instance of the IR send class. More...
 
AirwellProtocol _
 

Detailed Description

Class for handling detailed Airwell A/C messages.

Constructor & Destructor Documentation

◆ IRAirwellAc()

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

Class constructor.

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

◆ begin()

void IRAirwellAc::begin ( )

Set up hardware to be able to send a message.

◆ calibrate()

int8_t IRAirwellAc::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()

uint8_t IRAirwellAc::convertFan ( const stdAc::fanspeed_t  speed)
static

Convert a stdAc::fanspeed_t enum into it's native speed.

Parameters
[in]speedThe enum to be converted.
Returns
The native equivilant of the enum.

◆ convertMode()

uint8_t IRAirwellAc::convertMode ( const stdAc::opmode_t  mode)
static

Convert a stdAc::opmode_t enum into its native mode.

Parameters
[in]modeThe enum to be converted.
Returns
The native equivilant of the enum.

◆ getFan()

uint8_t IRAirwellAc::getFan ( ) const

Get the current fan speed setting.

Returns
The current fan speed.

◆ getMode()

uint8_t IRAirwellAc::getMode ( ) const

Get the current operation mode setting.

Returns
The current operation mode.

◆ getPowerToggle()

bool IRAirwellAc::getPowerToggle ( ) const

Get the power toggle setting from the internal state.

Returns
A boolean indicating the setting.

◆ getRaw()

uint64_t IRAirwellAc::getRaw ( ) const

Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.

Returns
A copy of the internal state.

◆ getTemp()

uint8_t IRAirwellAc::getTemp ( ) const

Get the current temperature setting.

Returns
Get current setting for temp. in degrees celsius.

◆ send()

void IRAirwellAc::send ( const uint16_t  repeat = kAirwellMinRepeats)

Send the current internal state as an IR message.

Parameters
[in]repeatNr. of times the message will be repeated.

◆ setFan()

void IRAirwellAc::setFan ( const uint8_t  speed)

Set the speed of the fan.

Parameters
[in]speedThe desired setting.
Note
The speed is locked to Low when in Dry mode.

◆ setMode()

void IRAirwellAc::setMode ( const uint8_t  mode)

Set the desired operation mode.

Parameters
[in]modeThe desired operation mode.

◆ setPowerToggle()

void IRAirwellAc::setPowerToggle ( const bool  on)

Turn on/off the Power Airwell setting.

Parameters
[in]onThe desired setting state.

◆ setRaw()

void IRAirwellAc::setRaw ( const uint64_t  state)

Set the raw state of the object.

Parameters
[in]stateThe raw state from the native IR message.

◆ setTemp()

void IRAirwellAc::setTemp ( const uint8_t  degrees)

Set the temperature.

Parameters
[in]degreesThe temperature in degrees celsius.

◆ stateReset()

void IRAirwellAc::stateReset ( )

Reset the internals of the object to a known good state.

◆ toCommon()

stdAc::state_t IRAirwellAc::toCommon ( void  ) const

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

Returns
The stdAc equivilant of the native settings.

◆ toCommonFanSpeed()

stdAc::fanspeed_t IRAirwellAc::toCommonFanSpeed ( const uint8_t  speed)
static

Convert a native fan speed into its stdAc equivilant.

Parameters
[in]speedThe native setting to be converted.
Returns
The stdAc equivilant of the native setting.

◆ toCommonMode()

stdAc::opmode_t IRAirwellAc::toCommonMode ( const uint8_t  mode)
static

Convert a native mode into its stdAc equivilant.

Parameters
[in]modeThe native setting to be converted.
Returns
The stdAc equivilant of the native setting.

◆ toString()

String IRAirwellAc::toString ( ) const

Convert the current internal state into a human readable string.

Returns
A human readable string.

Member Data Documentation

◆ _

AirwellProtocol IRAirwellAc::_
private

◆ _irsend

IRsend IRAirwellAc::_irsend
private

Instance of the IR send class.


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