|
IRremoteESP8266
|
#include <ir_Kelon.h>

Public Member Functions | |
| IRKelon168Ac (uint16_t pin, bool inverted=false, bool use_modulation=true) | |
| Class constructor. | |
| void | send (const uint16_t repeat=kKelon168DefaultRepeat, const bool calcChecksum=true) |
| Send the current internal state as an IR message. | |
| int8_t | calibrate (void) |
| Run the calibration to calculate uSec timing offsets for this platform. | |
| void | begin (void) |
| Set up hardware to be able to send a message. | |
| void | stateReset (void) |
| Reset the state of the remote to a known good state/sequence. | |
| void | setPower (const bool on) |
| Change the power setting. | |
| bool | getPower (void) const |
| Get the value of the current power toggle setting. | |
| void | setSleep (const bool on) |
| Set the Sleep setting of the A/C. | |
| bool | getSleep (void) const |
| Get the Sleep setting of the A/C. | |
| void | setSuper (const bool on) |
| Set the Super (Turbo/Jet) setting of the A/C. | |
| bool | getSuper (void) const |
| Get the Super (Turbo/Jet) setting of the A/C. | |
| void | setTemp (const uint8_t temp) |
| Set the temperature. | |
| uint8_t | getTemp (void) const |
| Get the current temperature setting. | |
| void | setFan (const uint8_t speed) |
| Set the speed of the fan. | |
| uint8_t | getFan (void) const |
| Get the current fan speed setting. The encoding is distributed across two bits, middle values (2 Low & 4 High) are encoded on the Fan2 bit. Normal values (1 Minimum, 3 Medium, 5 High) are written as 3,2,1 (inverted scale) | |
| void | setMode (const uint8_t mode) |
| Set the operating mode of the A/C. | |
| uint8_t | getMode (void) const |
| Get the operating mode setting of the A/C. | |
| void | setSwing (const bool on) |
| Set the (vertical) swing setting of the A/C. | |
| bool | getSwing (void) const |
| Get the (vertical) swing setting of the A/C. | |
| void | setLight (const bool on) |
| Set the Light (Display/LED) setting of the A/C. | |
| bool | getLight (void) const |
| Get the Light (Display/LED) setting of the A/C. | |
| uint16_t | getClock (void) const |
| Get the clock time in nr. of minutes past midnight. | |
| void | setClock (const uint16_t minsPastMidight) |
| Set the clock time in nr. of minutes past midnight. | |
| uint16_t | getOnTimer (void) const |
| Get the On Timer time.. | |
| void | setOnTimer (const uint16_t minsPastMidight) |
| Set the On Timer time. | |
| void | enableOnTimer (const bool on) |
| Enable the On Timer. | |
| bool | isOnTimerEnabled (void) const |
| Is the On timer enabled? | |
| uint16_t | getOffTimer (void) const |
| Get the Off Timer time.. | |
| void | setOffTimer (const uint16_t minsPastMidight) |
| Set the Off Timer time. | |
| void | enableOffTimer (const bool on) |
| Enable the Off Timer. | |
| bool | isOffTimerEnabled (void) const |
| Is the Off timer enabled? | |
| void | setCommand (const uint8_t code) |
| Set the Command (Button) setting of the A/C. | |
| uint8_t | getCommand (void) const |
| Get the Command (Button) setting of the A/C. | |
| kelon168_ac_remote_model_t | getModel (void) const |
| Get/Detect the model of the A/C. Actually only one remote type is supported. | |
| void | setModel (const kelon168_ac_remote_model_t model) |
| Set the model of the A/C to emulate. | |
| uint8_t * | getRaw (const bool calcChecksum=true) |
| Get a copy of the internal state/code for this protocol. | |
| void | setRaw (const uint8_t newCode[], const uint16_t length=kKelon168StateLength) |
| Set the internal state from a valid code for this protocol. | |
| stdAc::state_t | toCommon (const stdAc::state_t *prev=NULL) const |
| Convert the current internal state into its stdAc::state_t equivalent. | |
| String | toString (void) const |
| Convert the current internal state into a human readable string. | |
Static Public Member Functions | |
| static bool | validChecksum (const uint8_t state[], const uint16_t length=kKelon168StateLength) |
| Verify the checksum is valid for a given state. | |
| static uint8_t | convertMode (const stdAc::opmode_t mode) |
| Convert a stdAc::opmode_t enum into its native mode. | |
| static uint8_t | convertFan (const stdAc::fanspeed_t speed) |
| Convert a stdAc::fanspeed_t enum into it's native speed. | |
| static stdAc::opmode_t | toCommonMode (const uint8_t mode) |
| Convert a native mode into its stdAc equivalent. | |
| static stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed) |
| Convert a native fan speed into its stdAc equivalent. | |
Private Member Functions | |
| void | checksum (const uint16_t length=kWhirlpoolAcStateLength) |
| Calculate & set the checksum for the current internal state of the remote. | |
| void | _setTemp (const uint8_t temp, const bool remember=true) |
| Set the temperature. | |
| void | _setMode (const uint8_t mode) |
| Set the operating mode of the A/C. | |
| int8_t | getTempOffset (void) const |
| Calculate the temp. offset in deg C for the current model. Actually not used, but left for eventual support. | |
Private Attributes | |
| IRsend | _irsend |
| Instance of the IR send class. | |
| Kelon168Protocol | _ |
| uint8_t | _desiredtemp |
| The last user explicitly set temperature. | |
|
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? |
|
private |
Set the operating mode of the A/C.
| [in] | mode | The desired operating mode. |
|
private |
Set the temperature.
| [in] | temp | The temperature in degrees celsius. |
| [in] | remember | Do we save this temperature? |
| void IRKelon168Ac::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
private |
Calculate & set the checksum for the current internal state of the remote.
| [in] | length | The length/size of the internal state array. |
|
static |
Convert a stdAc::fanspeed_t enum into it's native speed.
| [in] | speed | The enum to be converted. |
|
static |
Convert a stdAc::opmode_t enum into its native mode.
| [in] | mode | The enum to be converted. |
| void IRKelon168Ac::enableOffTimer | ( | const bool | on | ) |
Enable the Off Timer.
| [in] | on | true, the timer is enabled. false, the timer is disabled. |
| void IRKelon168Ac::enableOnTimer | ( | const bool | on | ) |
Enable the On Timer.
| [in] | on | true, the timer is enabled. false, the timer is disabled. |
| uint16_t IRKelon168Ac::getClock | ( | void | ) | const |
Get the clock time in nr. of minutes past midnight.
| uint8_t IRKelon168Ac::getCommand | ( | void | ) | const |
Get the Command (Button) setting of the A/C.
| uint8_t IRKelon168Ac::getFan | ( | void | ) | const |
Get the current fan speed setting. The encoding is distributed across two bits, middle values (2 Low & 4 High) are encoded on the Fan2 bit. Normal values (1 Minimum, 3 Medium, 5 High) are written as 3,2,1 (inverted scale)
| bool IRKelon168Ac::getLight | ( | void | ) | const |
Get the Light (Display/LED) setting of the A/C.
| uint8_t IRKelon168Ac::getMode | ( | void | ) | const |
Get the operating mode setting of the A/C.
| kelon168_ac_remote_model_t IRKelon168Ac::getModel | ( | void | ) | const |
Get/Detect the model of the A/C. Actually only one remote type is supported.
| uint16_t IRKelon168Ac::getOffTimer | ( | void | ) | const |
Get the Off Timer time..
| uint16_t IRKelon168Ac::getOnTimer | ( | void | ) | const |
Get the On Timer time..
| bool IRKelon168Ac::getPower | ( | void | ) | const |
Get the value of the current power toggle setting.
| uint8_t * IRKelon168Ac::getRaw | ( | const bool | calcChecksum = true | ) |
Get a copy of the internal state/code for this protocol.
| [in] | calcChecksum | Do we need to calculate the checksum?. |
| bool IRKelon168Ac::getSleep | ( | void | ) | const |
Get the Sleep setting of the A/C.
| bool IRKelon168Ac::getSuper | ( | void | ) | const |
Get the Super (Turbo/Jet) setting of the A/C.
| bool IRKelon168Ac::getSwing | ( | void | ) | const |
Get the (vertical) swing setting of the A/C.
| uint8_t IRKelon168Ac::getTemp | ( | void | ) | const |
Get the current temperature setting.
|
private |
Calculate the temp. offset in deg C for the current model. Actually not used, but left for eventual support.
| bool IRKelon168Ac::isOffTimerEnabled | ( | void | ) | const |
Is the Off timer enabled?
| bool IRKelon168Ac::isOnTimerEnabled | ( | void | ) | const |
Is the On timer enabled?
| void IRKelon168Ac::send | ( | const uint16_t | repeat = kKelon168DefaultRepeat, |
| const bool | calcChecksum = true |
||
| ) |
Send the current internal state as an IR message.
| [in] | repeat | Nr. of times the message will be repeated. |
| [in] | calcChecksum | Do we need to calculate the checksum?. |
| void IRKelon168Ac::setClock | ( | const uint16_t | minsPastMidnight | ) |
Set the clock time in nr. of minutes past midnight.
| [in] | minsPastMidnight | The time expressed as minutes past midnight. |
| void IRKelon168Ac::setCommand | ( | const uint8_t | code | ) |
Set the Command (Button) setting of the A/C.
| [in] | code | The current Command (Button) of the A/C. |
| void IRKelon168Ac::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
| [in] | speed | The desired setting. |
| void IRKelon168Ac::setLight | ( | const bool | on | ) |
Set the Light (Display/LED) setting of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRKelon168Ac::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
| [in] | mode | The desired operating mode. |
| void IRKelon168Ac::setModel | ( | const kelon168_ac_remote_model_t | model | ) |
Set the model of the A/C to emulate.
| [in] | model | The enum of the appropriate model. |
| void IRKelon168Ac::setOffTimer | ( | const uint16_t | minsPastMidnight | ) |
Set the Off Timer time.
| [in] | minsPastMidnight | The time expressed as minutes past midnight. |
| void IRKelon168Ac::setOnTimer | ( | const uint16_t | minsPastMidnight | ) |
Set the On Timer time.
| [in] | minsPastMidnight | The time expressed as minutes past midnight. |
| void IRKelon168Ac::setPower | ( | const bool | on | ) |
Change the power setting.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRKelon168Ac::setRaw | ( | const uint8_t | newCode[], |
| const uint16_t | length = kKelon168StateLength |
||
| ) |
Set the internal state from a valid code for this protocol.
| [in] | newCode | A valid code for this protocol. |
| [in] | length | The length/size of the newCode array. |
| void IRKelon168Ac::setSleep | ( | const bool | on | ) |
Set the Sleep setting of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRKelon168Ac::setSuper | ( | const bool | on | ) |
Set the Super (Turbo/Jet) setting of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRKelon168Ac::setSwing | ( | const bool | on | ) |
Set the (vertical) swing setting of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRKelon168Ac::setTemp | ( | const uint8_t | temp | ) |
Set the temperature.
| [in] | temp | The temperature in degrees celsius. |
| void IRKelon168Ac::stateReset | ( | void | ) |
Reset the state of the remote to a known good state/sequence.
| stdAc::state_t IRKelon168Ac::toCommon | ( | const stdAc::state_t * | prev = NULL | ) | const |
Convert the current internal state into its stdAc::state_t equivalent.
| [in] | prev | Ptr to the previous state if required. |
|
static |
|
static |
| String IRKelon168Ac::toString | ( | void | ) | const |
Convert the current internal state 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 length/size of the array. |
|
private |
|
private |
The last user explicitly set temperature.
|
private |
Instance of the IR send class.