IRremoteESP8266: IRPanasonicAc32 Class Reference (original) (raw)

Class for handling detailed Panasonic 32bit A/C messages. More...

#include <[ir_Panasonic.h](ir%5F%5FPanasonic%5F8h%5Fsource.html)>

Public Member Functions
IRPanasonicAc32 (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor. More...
void stateReset (void)
Reset the state of the remote to a known good state/sequence. More...
void send (const uint16_t repeat=kPanasonicAcDefaultRepeat)
Send the current internal state as IR messages. 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 setPowerToggle (const bool on)
Set the Power Toggle setting of the A/C. More...
bool getPowerToggle (void) const
Get the Power Toggle setting of the A/C. More...
void setTemp (const uint8_t temp)
Set the desired temperature. More...
uint8_t getTemp (void) const
Get the current desired temperature setting. More...
void setFan (const uint8_t fan)
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...
void setRaw (const uint32_t state)
Set the internal state from a valid code for this protocol. More...
uint32_t getRaw (void) const
Get a copy of the internal state/code for this protocol. More...
void setSwingVertical (const uint8_t pos)
Control the vertical swing setting. More...
uint8_t getSwingVertical (void) const
Get the current vertical swing setting. More...
void setSwingHorizontal (const bool on)
Control the horizontal swing setting. More...
bool getSwingHorizontal (void) const
Get the current horizontal swing setting. More...
stdAc::state_t toCommon (const stdAc::state_t *prev=NULL) 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 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 uint8_t convertSwingV (const stdAc::swingv_t position)
Convert a standard A/C vertical swing into its native setting. 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...
static stdAc::swingv_t toCommonSwingV (const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent. More...
Private Attributes
IRsend _irsend
Instance of the IR send class. More...
PanasonicAc32Protocol _
The state in code form. More...

Class for handling detailed Panasonic 32bit A/C messages.

IRPanasonicAc32::IRPanasonicAc32 ( 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?

begin()

void IRPanasonicAc32::begin ( void )

Set up hardware to be able to send a message.

calibrate()

int8_t IRPanasonicAc32::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.

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.

convertSwingV()

uint8_t IRPanasonicAc32::convertSwingV ( const stdAc::swingv_t position) static

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

Parameters

Returns

The equivalent native horizontal swing position.

getFan()

uint8_t IRPanasonicAc32::getFan ( void ) const

Get the current fan speed setting.

Returns

The current fan speed.

getMode()

uint8_t IRPanasonicAc32::getMode ( void ) const

Get the operating mode setting of the A/C.

Returns

The current operating mode setting.

getPowerToggle()

bool IRPanasonicAc32::getPowerToggle ( void ) const

Get the Power Toggle setting of the A/C.

Returns

true, the setting is on. false, the setting is off.

getRaw()

uint32_t IRPanasonicAc32::getRaw ( void ) const

Get a copy of the internal state/code for this protocol.

Returns

The code for this protocol based on the current internal state.

getSwingHorizontal()

bool IRPanasonicAc32::getSwingHorizontal ( void ) const

Get the current horizontal swing setting.

Returns

The current position it is set to.

getSwingVertical()

uint8_t IRPanasonicAc32::getSwingVertical ( void ) const

Get the current vertical swing setting.

Returns

The current position it is set to.

getTemp()

uint8_t IRPanasonicAc32::getTemp ( void ) const

Get the current desired temperature setting.

Returns

The current setting for temp. in degrees celsius.

send()

Send the current internal state as IR messages.

Parameters

[in] repeat Nr. of times the message will be repeated.

setFan()

void IRPanasonicAc32::setFan ( const uint8_t speed )

Set the speed of the fan.

Parameters

[in] speed The desired setting.

setMode()

void IRPanasonicAc32::setMode ( const uint8_t mode )

Set the operating mode of the A/C.

Parameters

[in] mode The desired operating mode.

Note

If we get an unexpected mode, default to AUTO.

setPowerToggle()

void IRPanasonicAc32::setPowerToggle ( const bool on )

Set the Power Toggle setting of the A/C.

Parameters

[in] on true, the setting is on. false, the setting is off.

setRaw()

void IRPanasonicAc32::setRaw ( const uint32_t state )

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

Parameters

[in] state A valid code for this protocol.

setSwingHorizontal()

void IRPanasonicAc32::setSwingHorizontal ( const bool on )

Control the horizontal swing setting.

Parameters

[in] on true, the setting is on. false, the setting is off.

setSwingVertical()

void IRPanasonicAc32::setSwingVertical ( const uint8_t pos )

Control the vertical swing setting.

Parameters

[in] pos The position to set the vertical swing to.

setTemp()

void IRPanasonicAc32::setTemp ( const uint8_t degrees )

Set the desired temperature.

Parameters

[in] degrees The temperature in degrees celsius.

stateReset()

void IRPanasonicAc32::stateReset ( void )

Reset the state of the remote to a known good state/sequence.

toCommon()

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

Parameters

[in] prev Ptr to the previous state if required.

Returns

The stdAc equivalent of the native settings.

toCommonFanSpeed()

Convert a native fan speed into its stdAc equivalent.

Parameters

[in] spd 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.

toCommonSwingV()

stdAc::swingv_t IRPanasonicAc32::toCommonSwingV ( const uint8_t pos) static

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

Parameters

[in] pos A native position to convert.

Returns

The common vertical swing position.

toString()

String IRPanasonicAc32::toString ( void ) const

Convert the current internal state into a human readable string.

Returns

A human readable string.

_

_irsend

IRsend IRPanasonicAc32::_irsend private

Instance of the IR send class.


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