|
IRremoteESP8266
|
Class for handling detailed Kelvinator A/C messages. More...
#include <ir_Kelvinator.h>

Public Member Functions | |
| IRKelvinatorAC (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
| Class constructor. More... | |
| void | stateReset (void) |
| Reset the internals of the object to a known good state. More... | |
| void | send (const uint16_t repeat=kKelvinatorDefaultRepeat) |
| 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) |
| Set the internal state to have the power on. More... | |
| void | off (void) |
| Set the internal state to have the power off. More... | |
| void | setPower (const bool on) |
| Set the internal state to have the desired power. More... | |
| bool | getPower (void) const |
| Get the power setting from the internal state. More... | |
| void | setTemp (const uint8_t degrees) |
| Set the temperature setting. 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... | |
| void | setMode (const uint8_t mode) |
| Set the desired operation mode. More... | |
| uint8_t | getMode (void) const |
| Get the current operation mode setting. More... | |
| void | setSwingVertical (const bool automatic, const uint8_t position) |
| Set the Vertical Swing mode of the A/C. More... | |
| bool | getSwingVerticalAuto (void) const |
| Get the Vertical Swing Automatic mode setting of the A/C. More... | |
| uint8_t | getSwingVerticalPosition (void) const |
| Get the Vertical Swing position setting of the A/C. More... | |
| void | setSwingHorizontal (const bool on) |
| Control the current horizontal swing setting. More... | |
| bool | getSwingHorizontal (void) const |
| Is the horizontal swing setting on? More... | |
| void | setQuiet (const bool on) |
| Control the current Quiet setting. More... | |
| bool | getQuiet (void) const |
| Is the Quiet setting on? More... | |
| void | setIonFilter (const bool on) |
| Control the current Ion Filter setting. More... | |
| bool | getIonFilter (void) const |
| Is the Ion Filter setting on? More... | |
| void | setLight (const bool on) |
| Control the current Light setting. i.e. The LED display on the A/C unit that shows the basic settings. More... | |
| bool | getLight (void) const |
| Is the Light (Display) setting on? More... | |
| void | setXFan (const bool on) |
| Control the current XFan setting. This setting will cause the unit blow air after power off to dry out the A/C device. More... | |
| bool | getXFan (void) const |
| Is the XFan setting on? More... | |
| void | setTurbo (const bool on) |
| Control the current Turbo setting. More... | |
| bool | getTurbo (void) const |
| Is the Turbo setting on? More... | |
| uint8_t * | getRaw (void) |
| Get the raw state of the object, suitable to be sent with the appropriate IRsend object method. More... | |
| void | setRaw (const uint8_t new_code[]) |
| Set the raw state of the object. More... | |
| stdAc::state_t | toCommon (void) const |
| Convert the internal A/C object state to it's stdAc::state_t equivalent. More... | |
| String | toString (void) const |
| Convert the internal settings into a human readable string. More... | |
Static Public Member Functions | |
| static uint8_t | convertSwingV (const stdAc::swingv_t swingv) |
| Convert a stdAc::swingv_t enum into it's native setting. More... | |
| static stdAc::swingv_t | toCommonSwingV (const uint8_t pos) |
| static uint8_t | calcBlockChecksum (const uint8_t *block, const uint16_t length=kKelvinatorStateLength/2) |
| Calculate the checksum for a given block of state. More... | |
| static bool | validChecksum (const uint8_t state[], const uint16_t length=kKelvinatorStateLength) |
| Verify the checksum is valid for a given state. More... | |
| static uint8_t | convertMode (const stdAc::opmode_t mode) |
| Convert a standard A/C mode (stdAc::opmode_t) into it a native mode. More... | |
| static stdAc::opmode_t | toCommonMode (const uint8_t mode) |
| Convert a native mode to it's stdAc::opmode_t equivalent. More... | |
| static stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed) |
| Convert a native fan speed to it's stdAc::fanspeed_t equivalent. More... | |
Private Member Functions | |
| void | checksum (void) |
| Calculate the checksum for the internal state. More... | |
| void | fixup (void) |
| Fix up any odd conditions for the current state. More... | |
Private Attributes | |
| IRsend | _irsend |
| Instance of the IR send class. More... | |
| KelvinatorProtocol | _ |
Class for handling detailed Kelvinator 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? |
| void IRKelvinatorAC::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
static |
Calculate the checksum for a given block of state.
| [in] | block | A pointer to a block to calc the checksum of. |
| [in] | length | Length of the block array to checksum. |
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
private |
Calculate the checksum for the internal state.
|
static |
Convert a standard A/C mode (stdAc::opmode_t) into it a native mode.
| [in] | mode | A stdAc::opmode_t operation mode. |
|
static |
Convert a stdAc::swingv_t enum into it's native setting.
| [in] | swingv | The enum to be converted. |
|
private |
Fix up any odd conditions for the current state.
| uint8_t IRKelvinatorAC::getFan | ( | void | ) | const |
Get the current fan speed setting.
| bool IRKelvinatorAC::getIonFilter | ( | void | ) | const |
Is the Ion Filter setting on?
| bool IRKelvinatorAC::getLight | ( | void | ) | const |
Is the Light (Display) setting on?
| uint8_t IRKelvinatorAC::getMode | ( | void | ) | const |
Get the current operation mode setting.
| bool IRKelvinatorAC::getPower | ( | void | ) | const |
Get the power setting from the internal state.
| bool IRKelvinatorAC::getQuiet | ( | void | ) | const |
Is the Quiet setting on?
| uint8_t * IRKelvinatorAC::getRaw | ( | void | ) |
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
| bool IRKelvinatorAC::getSwingHorizontal | ( | void | ) | const |
Is the horizontal swing setting on?
| bool IRKelvinatorAC::getSwingVerticalAuto | ( | void | ) | const |
Get the Vertical Swing Automatic mode setting of the A/C.
| uint8_t IRKelvinatorAC::getSwingVerticalPosition | ( | void | ) | const |
Get the Vertical Swing position setting of the A/C.
| uint8_t IRKelvinatorAC::getTemp | ( | void | ) | const |
Get the current temperature setting.
| bool IRKelvinatorAC::getTurbo | ( | void | ) | const |
Is the Turbo setting on?
| bool IRKelvinatorAC::getXFan | ( | void | ) | const |
Is the XFan setting on?
| void IRKelvinatorAC::off | ( | void | ) |
Set the internal state to have the power off.
| void IRKelvinatorAC::on | ( | void | ) |
Set the internal state to have the power on.
| void IRKelvinatorAC::send | ( | const uint16_t | repeat = kKelvinatorDefaultRepeat | ) |
Send the current internal state as an IR message.
| [in] | repeat | Nr. of times the message will be repeated. |
| void IRKelvinatorAC::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
| [in] | speed | 0 is auto, 1-5 is the speed |
| void IRKelvinatorAC::setIonFilter | ( | const bool | on | ) |
Control the current Ion Filter setting.
| [in] | on | The desired setting. |
| void IRKelvinatorAC::setLight | ( | const bool | on | ) |
Control the current Light setting. i.e. The LED display on the A/C unit that shows the basic settings.
| [in] | on | The desired setting. |
| void IRKelvinatorAC::setMode | ( | const uint8_t | mode | ) |
Set the desired operation mode.
| [in] | mode | The desired operation mode. |
| void IRKelvinatorAC::setPower | ( | const bool | on | ) |
Set the internal state to have the desired power.
| [in] | on | The desired power state. |
| void IRKelvinatorAC::setQuiet | ( | const bool | on | ) |
Control the current Quiet setting.
| [in] | on | The desired setting. |
| void IRKelvinatorAC::setRaw | ( | const uint8_t | new_code[] | ) |
Set the raw state of the object.
| [in] | new_code | The raw state from the native IR message. |
| void IRKelvinatorAC::setSwingHorizontal | ( | const bool | on | ) |
Control the current horizontal swing setting.
| [in] | on | The desired setting. |
| void IRKelvinatorAC::setSwingVertical | ( | const bool | automatic, |
| const uint8_t | position | ||
| ) |
Set the Vertical Swing mode of the A/C.
| [in] | automatic | Do we use the automatic setting? |
| [in] | position | The position/mode to set the vanes to. |
| void IRKelvinatorAC::setTemp | ( | const uint8_t | degrees | ) |
Set the temperature setting.
| [in] | degrees | The temperature in degrees celsius. |
| void IRKelvinatorAC::setTurbo | ( | const bool | on | ) |
Control the current Turbo setting.
| [in] | on | The desired setting. |
| void IRKelvinatorAC::setXFan | ( | const bool | on | ) |
Control the current XFan setting. This setting will cause the unit blow air after power off to dry out the A/C device.
| [in] | on | The desired setting. |
| void IRKelvinatorAC::stateReset | ( | void | ) |
Reset the internals of the object to a known good state.
| stdAc::state_t IRKelvinatorAC::toCommon | ( | void | ) | const |
Convert the internal A/C object state to it's stdAc::state_t equivalent.
|
static |
Convert a native fan speed to it's stdAc::fanspeed_t equivalent.
| [in] | speed | A native fan speed value. |
|
static |
Convert a native mode to it's stdAc::opmode_t equivalent.
| [in] | mode | A native operating mode value. |
|
static |
| String IRKelvinatorAC::toString | ( | void | ) | const |
Convert the internal settings into a human readable string.
|
static |
Verify the checksum is valid for a given state.
| [in] | state | The array to verify the checksum of. |
| [in] | length | The size of the state. |
|
private |
|
private |
Instance of the IR send class.
1.8.17