IRremoteESP8266
|
Class for handling detailed Technibel A/C messages. More...
#include <ir_Technibel.h>
Public Member Functions | |
IRTechnibelAc (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
Class constructor. More... | |
void | stateReset () |
Reset the internal state of the emulation. More... | |
void | send (const uint16_t repeat=kTechnibelAcDefaultRepeat) |
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 | setPower (const bool on) |
Change the power setting. More... | |
bool | getPower () |
Get the value of the current power setting. More... | |
void | on () |
Set the requested power state of the A/C to on. More... | |
void | off () |
Set the requested power state of the A/C to off. More... | |
void | setTempUnit (const bool celsius) |
Set the temperature unit setting. More... | |
bool | getTempUnit (void) |
Get the temperature unit setting. More... | |
void | setTemp (const uint8_t temp, const bool fahrenheit=false) |
Set the temperature. More... | |
uint8_t | getTemp () |
Get the current temperature setting. More... | |
void | setFan (const uint8_t speed) |
Set the speed of the fan. More... | |
uint8_t | getFan () |
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 () |
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 () |
Get the (vertical) swing setting of the A/C. More... | |
bool | convertSwing (const stdAc::swingv_t swing) |
Convert a stdAc::swingv_t enum into it's native swing. More... | |
stdAc::swingv_t | toCommonSwing (const bool swing) |
Convert a native swing into its stdAc equivalent. More... | |
void | setSleep (const bool on) |
Set the Sleep setting of the A/C. More... | |
bool | getSleep () |
Get the Sleep setting of the A/C. More... | |
void | setTimerEnabled (const bool on) |
Set the enable timer setting. More... | |
bool | getTimerEnabled (void) |
Is the timer function enabled? More... | |
void | setTimer (const uint16_t nr_of_mins) |
Set the timer for when the A/C unit will switch off. More... | |
uint16_t | getTimer (void) |
Get the timer time for when the A/C unit will switch power state. More... | |
uint64_t | getRaw () |
Get a copy of the internal state/code for this protocol. More... | |
void | setRaw (const uint64_t state) |
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 () |
Convert the current internal state into a human readable string. More... | |
Static Public Member Functions | |
static uint8_t | calcChecksum (const uint64_t state) |
Compute the checksum of the supplied state. More... | |
static bool | validChecksum (const uint64_t state) |
Confirm the checksum of the supplied state is valid. More... | |
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 | |
void | checksum (void) |
Set the checksum of the internal state. More... | |
Private Attributes | |
IRsend | _irsend |
IRsendTest | _irsend |
uint64_t | remote_state |
uint8_t | _saved_temp |
uint8_t | _saved_temp_units |
Class for handling detailed Technibel 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 IRTechnibelAc::begin | ( | ) |
Set up hardware to be able to send a message.
|
static |
Compute the checksum of the supplied state.
[in] | state | A valid code for this protocol. |
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
private |
Set the checksum of the internal state.
uint8_t IRTechnibelAc::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 IRTechnibelAc::convertMode | ( | const stdAc::opmode_t | mode | ) |
Convert a stdAc::opmode_t enum into its native mode.
[in] | mode | The enum to be converted. |
bool IRTechnibelAc::convertSwing | ( | const stdAc::swingv_t | swing | ) |
Convert a stdAc::swingv_t enum into it's native swing.
[in] | swing | The enum to be converted. |
uint8_t IRTechnibelAc::getFan | ( | ) |
Get the current fan speed setting.
uint8_t IRTechnibelAc::getMode | ( | ) |
Get the operating mode setting of the A/C.
bool IRTechnibelAc::getPower | ( | ) |
Get the value of the current power setting.
uint64_t IRTechnibelAc::getRaw | ( | ) |
Get a copy of the internal state/code for this protocol.
bool IRTechnibelAc::getSleep | ( | ) |
Get the Sleep setting of the A/C.
bool IRTechnibelAc::getSwing | ( | ) |
Get the (vertical) swing setting of the A/C.
uint8_t IRTechnibelAc::getTemp | ( | ) |
Get the current temperature setting.
bool IRTechnibelAc::getTempUnit | ( | void | ) |
Get the temperature unit setting.
uint16_t IRTechnibelAc::getTimer | ( | void | ) |
Get the timer time for when the A/C unit will switch power state.
0
means off. bool IRTechnibelAc::getTimerEnabled | ( | void | ) |
Is the timer function enabled?
void IRTechnibelAc::off | ( | ) |
Set the requested power state of the A/C to off.
void IRTechnibelAc::on | ( | ) |
Set the requested power state of the A/C to on.
void IRTechnibelAc::send | ( | const uint16_t | repeat = kTechnibelAcDefaultRepeat | ) |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
void IRTechnibelAc::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
[in] | speed | The desired setting. |
void IRTechnibelAc::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
[in] | mode | The desired operating mode. |
void IRTechnibelAc::setPower | ( | const bool | on | ) |
Change the power setting.
[in] | on | true, the setting is on. false, the setting is off. |
void IRTechnibelAc::setRaw | ( | const uint64_t | state | ) |
Set the internal state from a valid code for this protocol.
[in] | state | A valid code for this protocol. |
void IRTechnibelAc::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 IRTechnibelAc::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 IRTechnibelAc::setTemp | ( | const uint8_t | degrees, |
const bool | fahrenheit = false |
||
) |
Set the temperature.
[in] | degrees | The temperature in degrees. |
[in] | fahrenheit | The temperature unit: true=°F, false(default)=°C. |
void IRTechnibelAc::setTempUnit | ( | const bool | fahrenheit | ) |
Set the temperature unit setting.
[in] | fahrenheit | true, the unit is °F. false, the unit is °C. |
void IRTechnibelAc::setTimer | ( | const uint16_t | nr_of_mins | ) |
Set the timer for when the A/C unit will switch off.
[in] | nr_of_mins | Number of minutes before power off. 0 will clear the timer. Max is 24 hrs (1440 mins). |
void IRTechnibelAc::setTimerEnabled | ( | const bool | on | ) |
Set the enable timer setting.
[in] | on | true, the setting is on. false, the setting is off. |
void IRTechnibelAc::stateReset | ( | ) |
Reset the internal state of the emulation.
stdAc::state_t IRTechnibelAc::toCommon | ( | void | ) |
Convert the current internal state into its stdAc::state_t equivalent.
|
static |
|
static |
stdAc::swingv_t IRTechnibelAc::toCommonSwing | ( | const bool | swing | ) |
String IRTechnibelAc::toString | ( | ) |
Convert the current internal state into a human readable string.
|
static |
Confirm the checksum of the supplied state is valid.
[in] | state | A valid code for this protocol. |
true
if the checksum is correct, otherwise false
.
|
private |
|
private |
|
private |
|
private |
|
private |