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

Public Member Functions | |
| IREuromAc (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
| Class constructor. | |
| void | stateReset () |
| Reset the internals of the object to a known good state. | |
| void | send (const uint16_t repeat=kNoRepeat) |
| 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 | setRaw (const uint8_t state[]) |
| Set the raw state of the remote. | |
| uint8_t * | getRaw (void) |
| Get the raw state of the remote, suitable to be sent with the appropriate IRsend object method. | |
| void | on (void) |
| Set the internal state to powered on. | |
| void | off (void) |
| Set the internal state to powered off. | |
| void | setPower (const bool state) |
| Set the internal state to use the desired power setting. | |
| bool | getPower (void) const |
| Get the current power setting from the internal state. | |
| void | setMode (const uint8_t mode) |
| Set the internal state to use the desired operation mode. | |
| uint8_t | getMode (void) const |
| Get the current operation mode setting from the internal state. | |
| void | setTemp (const uint8_t degrees, const bool fahrenheit=false) |
| Set the internal state to use the desired temperature. | |
| uint8_t | getTemp (void) const |
| Get the current temperature from the internal state. | |
| bool | getTempIsFahrenheit (void) const |
| Check if Fahrenheit is currently being used by the internal state. | |
| void | setFan (const uint8_t speed) |
| Set the internal state to use the desired fan speed. | |
| uint8_t | getFan (void) const |
| Get the current fan speed from the internal state. | |
| void | setSwing (const bool state) |
| Set the internal state to use the desired swing setting. | |
| bool | getSwing (void) const |
| Get the current swing setting from the internal state. | |
| void | setSleep (const bool state) |
| Set the internal state to use the desired sleep setting. | |
| bool | getSleep (void) const |
| Get the current sleep setting from the internal state. | |
| void | setOffTimer (const uint8_t duration) |
| Set the internal state to use the desired "off timer" duration. | |
| uint8_t | getOffTimer (void) const |
| Get the current "off timer" duration from the internal state. | |
| void | setOnTimer (const uint8_t duration) |
| Set the internal state to use the desired "on timer" duration. | |
| uint8_t | getOnTimer (void) const |
| Get the current "on timer" duration from the internal state. | |
| stdAc::state_t | toCommon (void) 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 uint8_t | calcChecksum (const uint8_t state[], const uint16_t length=kEuromStateLength) |
| Calculate the checksum for the supplied state. | |
| static bool | validChecksum (const uint8_t state[], const uint16_t length=kEuromStateLength) |
| Verify if 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 operation mode. | |
| static uint8_t | convertFan (const stdAc::fanspeed_t speed) |
| Convert a stdAc::fanspeed_t enum into its native speed. | |
| static bool | convertSwing (const stdAc::swingv_t swing) |
| Convert a stdAc::swingv_t enum into its native swing. | |
| static stdAc::opmode_t | toCommonMode (const uint8_t mode) |
| Convert a native operation mode into its stdAc enum equivalent. | |
| static stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed) |
| Convert a native fan speed into its stdAc enum equivalent. | |
| static stdAc::swingv_t | toCommonSwing (const bool swing) |
| Convert a native swing setting into its stdAc enum equivalent. | |
Private Member Functions | |
| uint8_t | getModeCelsiusByte (const uint8_t mode, const uint8_t celsius) const |
| Combine a mode flag and temperature into a single byte for the AC. Note that validity is not checked again. | |
| uint8_t | getSleepOnTimerByte (const bool sleep, const uint8_t hours) const |
| Combine sleep mode and a timer duration into a single byte for the AC. Note that validity is not checked again. | |
| void | checksum (void) |
| Update the checksum value for the current internal state. | |
Private Attributes | |
| IRsend | _irsend |
| EuromProtocol | _ |
| uint8_t | state_mode_ = kEuromCool |
| uint8_t | state_celsius_ = 23 |
| bool | state_sleep_ = false |
| uint8_t | state_on_timer_ = kEuromTimerMin |
Class for handling detailed Eurom 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 IREuromAc::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
static |
Calculate the checksum for the supplied state.
| [in] | state | The source state to generate the checksum from. |
| [in] | length | Length of the supplied state to checksum. |
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
private |
Update the checksum value for the current internal state.
|
static |
Convert a stdAc::fanspeed_t enum into its native speed.
| [in] | speed | The enum to be converted. |
|
static |
Convert a stdAc::opmode_t enum into its native operation mode.
| [in] | mode | The enum to be converted. |
|
static |
Convert a stdAc::swingv_t enum into its native swing.
| [in] | swing | The enum to be converted. |
| uint8_t IREuromAc::getFan | ( | void | ) | const |
Get the current fan speed from the internal state.
| uint8_t IREuromAc::getMode | ( | void | ) | const |
Get the current operation mode setting from the internal state.
|
private |
Combine a mode flag and temperature into a single byte for the AC. Note that validity is not checked again.
| [in] | mode | A valid mode flag. |
| [in] | celsius | A valid temperature, i.e. within the proper range. |
| uint8_t IREuromAc::getOffTimer | ( | void | ) | const |
Get the current "off timer" duration from the internal state.
| uint8_t IREuromAc::getOnTimer | ( | void | ) | const |
Get the current "on timer" duration from the internal state.
| bool IREuromAc::getPower | ( | void | ) | const |
Get the current power setting from the internal state.
| uint8_t * IREuromAc::getRaw | ( | void | ) |
Get the raw state of the remote, suitable to be sent with the appropriate IRsend object method.
| bool IREuromAc::getSleep | ( | void | ) | const |
Get the current sleep setting from the internal state.
|
private |
Combine sleep mode and a timer duration into a single byte for the AC. Note that validity is not checked again.
| [in] | sleep | Whether sleep mode should be enabled. |
| [in] | hours | A valid duration, i.e. within the proper range. |
| bool IREuromAc::getSwing | ( | void | ) | const |
Get the current swing setting from the internal state.
| uint8_t IREuromAc::getTemp | ( | void | ) | const |
Get the current temperature from the internal state.
| bool IREuromAc::getTempIsFahrenheit | ( | void | ) | const |
Check if Fahrenheit is currently being used by the internal state.
| void IREuromAc::off | ( | void | ) |
Set the internal state to powered off.
| void IREuromAc::on | ( | void | ) |
Set the internal state to powered on.
| void IREuromAc::send | ( | const uint16_t | repeat = kNoRepeat | ) |
Send the current internal state as an IR message.
| [in] | repeat | Number of times the message will be repeated. Note that the original remote sends the same signal twice, but the actual A/C works just fine if you send it once. |
| void IREuromAc::setFan | ( | const uint8_t | speed | ) |
Set the internal state to use the desired fan speed.
| [in] | speed | The desired fan speed. |
| void IREuromAc::setMode | ( | const uint8_t | mode | ) |
Set the internal state to use the desired operation mode.
| [in] | mode | The desired operation mode. |
| void IREuromAc::setOffTimer | ( | const uint8_t | duration | ) |
Set the internal state to use the desired "off timer" duration.
| [in] | duration | The desired duration, in hours. |
| void IREuromAc::setOnTimer | ( | const uint8_t | duration | ) |
Set the internal state to use the desired "on timer" duration.
| [in] | duration | The desired duration, in hours. |
| void IREuromAc::setPower | ( | const bool | state | ) |
Set the internal state to use the desired power setting.
| [in] | state | The desired power setting. |
| void IREuromAc::setRaw | ( | const uint8_t | state[] | ) |
Set the raw state of the remote.
| [in] | state | The raw state from the native IR message. |
| void IREuromAc::setSleep | ( | const bool | state | ) |
Set the internal state to use the desired sleep setting.
| [in] | state | The desired sleep setting. |
| void IREuromAc::setSwing | ( | const bool | state | ) |
Set the internal state to use the desired swing setting.
| [in] | state | The desired swing setting. |
| void IREuromAc::setTemp | ( | const uint8_t | degrees, |
| const bool | fahrenheit = false |
||
| ) |
Set the internal state to use the desired temperature.
| [in] | degrees | The desired temperature in degrees, normally Celsius. |
| [in] | fahrenheit | If the given temperature is in Fahrenheit instead. |
| void IREuromAc::stateReset | ( | void | ) |
Reset the internals of the object to a known good state.
| stdAc::state_t IREuromAc::toCommon | ( | void | ) | const |
Convert the current internal state into its stdAc::state_t equivalent.
|
static |
|
static |
|
static |
| String IREuromAc::toString | ( | void | ) | const |
Convert the current internal state into a human-readable string.
|
static |
Verify if the checksum is valid for a given state.
| [in] | state | The source state to verify the checksum of. |
| [in] | length | The size of the supplied state. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |