IRremoteESP8266
|
Class for handling detailed Teco A/C messages. More...
#include <ir_Teco.h>
Public Member Functions | |
IRTecoAc (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
Class constructor. More... | |
void | stateReset (void) |
Reset the internal state of the emulation. More... | |
void | send (const uint16_t repeat=kTecoDefaultRepeat) |
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 requested power state of the A/C to on. More... | |
void | off (void) |
Set the requested power state of the A/C to off. More... | |
void | setPower (const bool on) |
Change the power setting. More... | |
bool | getPower (void) |
Get the value of the current power setting. More... | |
void | setTemp (const uint8_t temp) |
Set the temperature. More... | |
uint8_t | getTemp (void) |
Get the current temperature setting. More... | |
void | setFan (const uint8_t fan) |
Set the speed of the fan. More... | |
uint8_t | getFan (void) |
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) |
Get the operating mode setting of the A/C. More... | |
void | setSwing (const bool on) |
Set the (vertical) swing setting of the A/C. More... | |
bool | getSwing (void) |
Get the (vertical) swing setting of the A/C. More... | |
void | setSleep (const bool on) |
Set the Sleep setting of the A/C. More... | |
bool | getSleep (void) |
Get the Sleep setting of the A/C. More... | |
void | setLight (const bool on) |
Set the Light (LED/Display) setting of the A/C. More... | |
bool | getLight (void) |
Get the Light (LED/Display) setting of the A/C. More... | |
void | setHumid (const bool on) |
Set the Humid setting of the A/C. More... | |
bool | getHumid (void) |
Get the Humid setting of the A/C. More... | |
void | setSave (const bool on) |
Set the Save setting of the A/C. More... | |
bool | getSave (void) |
Get the Save setting of the A/C. More... | |
uint16_t | getTimer (void) |
Get the timer time for when the A/C unit will switch power state. More... | |
void | setTimer (const uint16_t mins) |
Set the timer for when the A/C unit will switch power state. More... | |
uint64_t | getRaw (void) |
Get a copy of the internal state/code for this protocol. More... | |
void | setRaw (const uint64_t new_code) |
Set the internal state from a valid code for this protocol. More... | |
uint8_t | convertMode (const stdAc::opmode_t mode) |
Convert a stdAc::opmode_t enum into its native mode. More... | |
uint8_t | convertFan (const stdAc::fanspeed_t speed) |
Convert a stdAc::fanspeed_t enum into it's native speed. More... | |
stdAc::state_t | toCommon (void) |
Convert the current internal state into its stdAc::state_t equivalent. More... | |
String | toString (void) |
Convert the current internal state into a human readable string. More... | |
Static Public Member Functions | |
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... | |
Private Member Functions | |
bool | getTimerEnabled (void) |
Is the timer function enabled? More... | |
Private Attributes | |
IRsend | _irsend |
Instance of the IR send class. More... | |
uint64_t | remote_state |
The state of the IR remote in IR code form. More... | |
Class for handling detailed Teco 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 IRTecoAc::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
uint8_t IRTecoAc::convertFan | ( | const stdAc::fanspeed_t | speed | ) |
Convert a stdAc::fanspeed_t enum into it's native speed.
[in] | speed | The enum to be converted. |
uint8_t IRTecoAc::convertMode | ( | const stdAc::opmode_t | mode | ) |
Convert a stdAc::opmode_t enum into its native mode.
[in] | mode | The enum to be converted. |
uint8_t IRTecoAc::getFan | ( | void | ) |
Get the current fan speed setting.
bool IRTecoAc::getHumid | ( | void | ) |
Get the Humid setting of the A/C.
bool IRTecoAc::getLight | ( | void | ) |
Get the Light (LED/Display) setting of the A/C.
uint8_t IRTecoAc::getMode | ( | void | ) |
Get the operating mode setting of the A/C.
bool IRTecoAc::getPower | ( | void | ) |
Get the value of the current power setting.
uint64_t IRTecoAc::getRaw | ( | void | ) |
Get a copy of the internal state/code for this protocol.
bool IRTecoAc::getSave | ( | void | ) |
Get the Save setting of the A/C.
bool IRTecoAc::getSleep | ( | void | ) |
Get the Sleep setting of the A/C.
bool IRTecoAc::getSwing | ( | void | ) |
Get the (vertical) swing setting of the A/C.
uint8_t IRTecoAc::getTemp | ( | void | ) |
Get the current temperature setting.
uint16_t IRTecoAc::getTimer | ( | void | ) |
Get the timer time for when the A/C unit will switch power state.
0
means off.
|
private |
Is the timer function enabled?
void IRTecoAc::off | ( | void | ) |
Set the requested power state of the A/C to off.
void IRTecoAc::on | ( | void | ) |
Set the requested power state of the A/C to on.
void IRTecoAc::send | ( | const uint16_t | repeat = kTecoDefaultRepeat | ) |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
void IRTecoAc::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
[in] | speed | The desired setting. |
void IRTecoAc::setHumid | ( | const bool | on | ) |
Set the Humid setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRTecoAc::setLight | ( | const bool | on | ) |
Set the Light (LED/Display) setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRTecoAc::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
[in] | mode | The desired operating mode. |
void IRTecoAc::setPower | ( | const bool | on | ) |
Change the power setting.
[in] | on | true, the setting is on. false, the setting is off. |
void IRTecoAc::setRaw | ( | const uint64_t | new_code | ) |
Set the internal state from a valid code for this protocol.
[in] | new_code | A valid code for this protocol. |
void IRTecoAc::setSave | ( | const bool | on | ) |
Set the Save setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRTecoAc::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 IRTecoAc::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 IRTecoAc::setTemp | ( | const uint8_t | temp | ) |
Set the temperature.
[in] | temp | The temperature in degrees celsius. |
void IRTecoAc::setTimer | ( | const uint16_t | nr_mins | ) |
Set the timer for when the A/C unit will switch power state.
[in] | nr_mins | Number of minutes before power state change. 0 will clear the timer. Max is 24 hrs. |
void IRTecoAc::stateReset | ( | void | ) |
Reset the internal state of the emulation.
stdAc::state_t IRTecoAc::toCommon | ( | void | ) |
Convert the current internal state into its stdAc::state_t equivalent.
|
static |
|
static |
String IRTecoAc::toString | ( | void | ) |
Convert the current internal state into a human readable string.
|
private |
Instance of the IR send class.
|
private |
The state of the IR remote in IR code form.