IRremoteESP8266
|
Class for handling detailed Airwell A/C messages. More...
#include <ir_Airwell.h>
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 | _ |
Class for handling detailed Airwell 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 IRAirwellAc::begin | ( | ) |
Set up hardware to be able to send a message.
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
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. |
uint8_t IRAirwellAc::getFan | ( | ) | const |
Get the current fan speed setting.
uint8_t IRAirwellAc::getMode | ( | ) | const |
Get the current operation mode setting.
bool IRAirwellAc::getPowerToggle | ( | ) | const |
Get the power toggle setting from the internal state.
uint64_t IRAirwellAc::getRaw | ( | ) | const |
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
uint8_t IRAirwellAc::getTemp | ( | ) | const |
Get the current temperature setting.
void IRAirwellAc::send | ( | const uint16_t | repeat = kAirwellMinRepeats | ) |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
void IRAirwellAc::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
[in] | speed | The desired setting. |
void IRAirwellAc::setMode | ( | const uint8_t | mode | ) |
Set the desired operation mode.
[in] | mode | The desired operation mode. |
void IRAirwellAc::setPowerToggle | ( | const bool | on | ) |
Turn on/off the Power Airwell setting.
[in] | on | The desired setting state. |
void IRAirwellAc::setRaw | ( | const uint64_t | state | ) |
Set the raw state of the object.
[in] | state | The raw state from the native IR message. |
void IRAirwellAc::setTemp | ( | const uint8_t | degrees | ) |
Set the temperature.
[in] | degrees | The temperature in degrees celsius. |
void IRAirwellAc::stateReset | ( | ) |
Reset the internals of the object to a known good state.
stdAc::state_t IRAirwellAc::toCommon | ( | void | ) | const |
Convert the current internal state into its stdAc::state_t equivilant.
|
static |
|
static |
String IRAirwellAc::toString | ( | ) | const |
Convert the current internal state into a human readable string.
|
private |
|
private |
Instance of the IR send class.