IRremoteESP8266
|
Class for handling detailed Vestel A/C messages. More...
#include <ir_Vestel.h>
Public Member Functions | |
IRVestelAc (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
Class constructor. More... | |
void | stateReset (void) |
Reset the state of the remote to a known good state/sequence. More... | |
void | send (const uint16_t repeat=kNoRepeat) |
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) const |
Get the value of the current power setting. More... | |
void | setAuto (const int8_t autoLevel) |
Set Auto mode/level of the A/C. More... | |
void | setTimer (const uint16_t minutes) |
Set Timer option of A/C. More... | |
uint16_t | getTimer (void) const |
Get the Timer time of A/C. More... | |
void | setTime (const uint16_t minutes) |
Set the A/C's internal clock. More... | |
uint16_t | getTime (void) const |
Get the A/C's internal clock's time. More... | |
void | setOnTimer (const uint16_t minutes) |
Set the On timer time on the A/C. More... | |
uint16_t | getOnTimer (void) const |
Get the A/C's On Timer time. More... | |
void | setOffTimer (const uint16_t minutes) |
Set the Off timer time on the A/C. More... | |
uint16_t | getOffTimer (void) const |
Get the A/C's Off Timer time. More... | |
void | setTemp (const uint8_t temp) |
Set the temperature. More... | |
uint8_t | getTemp (void) const |
Get the current temperature setting. More... | |
void | setFan (const uint8_t fan) |
Set the speed of the fan. More... | |
uint8_t | getFan (void) const |
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) const |
Get the operating mode setting of the A/C. More... | |
void | setRaw (const uint8_t *newState) |
Set the internal state from a valid code for this protocol. More... | |
void | setRaw (const uint64_t newState) |
Set the internal state from a valid code for this protocol. More... | |
uint64_t | getRaw (void) |
Get a copy of the internal state/code for this protocol. More... | |
void | setSwing (const bool on) |
Set the Swing Roaming setting of the A/C. More... | |
bool | getSwing (void) const |
Get the Swing Roaming setting of the A/C. More... | |
void | setSleep (const bool on) |
Set the Sleep setting of the A/C. More... | |
bool | getSleep (void) const |
Get the Sleep setting of the A/C. More... | |
void | setTurbo (const bool on) |
Set the Turbo setting of the A/C. More... | |
bool | getTurbo (void) const |
Get the Turbo setting of the A/C. More... | |
void | setIon (const bool on) |
Set the Ion (Filter) setting of the A/C. More... | |
bool | getIon (void) const |
Get the Ion (Filter) setting of the A/C. More... | |
bool | isTimeCommand (void) const |
Is the current state a time command? More... | |
bool | isOnTimerActive (void) const |
Get if the On Timer is active on the A/C. More... | |
void | setOnTimerActive (const bool on) |
Set the On timer to be active on the A/C. More... | |
bool | isOffTimerActive (void) const |
Get if the Off Timer is active on the A/C. More... | |
void | setOffTimerActive (const bool on) |
Set the Off timer to be active on the A/C. More... | |
bool | isTimerActive (void) const |
Get if the Timer is active on the A/C. More... | |
void | setTimerActive (const bool on) |
Set the timer to be active on the A/C. More... | |
stdAc::state_t | toCommon (void) const |
Convert the current internal state into its stdAc::state_t equivalent. More... | |
String | toString (void) const |
Convert the current internal state into a human readable string. More... | |
Static Public Member Functions | |
static bool | validChecksum (const uint64_t state) |
Verify the checksum is valid for a given state. More... | |
static uint8_t | calcChecksum (const uint64_t state) |
Calculate the checksum for a given state. More... | |
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 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) |
Calculate & set the checksum for the current internal state of the remote. More... | |
Private Attributes | |
IRsend | _irsend |
Instance of the IR send class. More... | |
VestelProtocol | _ |
Class for handling detailed Vestel 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 IRVestelAc::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
static |
Calculate the checksum for a given state.
[in] | state | The state to calc the checksum of. |
|
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.
|
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 IRVestelAc::getFan | ( | void | ) | const |
Get the current fan speed setting.
bool IRVestelAc::getIon | ( | void | ) | const |
Get the Ion (Filter) setting of the A/C.
uint8_t IRVestelAc::getMode | ( | void | ) | const |
Get the operating mode setting of the A/C.
uint16_t IRVestelAc::getOffTimer | ( | void | ) | const |
Get the A/C's Off Timer time.
uint16_t IRVestelAc::getOnTimer | ( | void | ) | const |
Get the A/C's On Timer time.
bool IRVestelAc::getPower | ( | void | ) | const |
Get the value of the current power setting.
uint64_t IRVestelAc::getRaw | ( | void | ) |
Get a copy of the internal state/code for this protocol.
bool IRVestelAc::getSleep | ( | void | ) | const |
Get the Sleep setting of the A/C.
bool IRVestelAc::getSwing | ( | void | ) | const |
Get the Swing Roaming setting of the A/C.
uint8_t IRVestelAc::getTemp | ( | void | ) | const |
Get the current temperature setting.
uint16_t IRVestelAc::getTime | ( | void | ) | const |
Get the A/C's internal clock's time.
uint16_t IRVestelAc::getTimer | ( | void | ) | const |
Get the Timer time of A/C.
bool IRVestelAc::getTurbo | ( | void | ) | const |
Get the Turbo setting of the A/C.
bool IRVestelAc::isOffTimerActive | ( | void | ) | const |
Get if the Off Timer is active on the A/C.
bool IRVestelAc::isOnTimerActive | ( | void | ) | const |
Get if the On Timer is active on the A/C.
bool IRVestelAc::isTimeCommand | ( | void | ) | const |
Is the current state a time command?
bool IRVestelAc::isTimerActive | ( | void | ) | const |
Get if the Timer is active on the A/C.
void IRVestelAc::off | ( | void | ) |
Set the requested power state of the A/C to off.
void IRVestelAc::on | ( | void | ) |
Set the requested power state of the A/C to on.
void IRVestelAc::send | ( | const uint16_t | repeat = kNoRepeat | ) |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
void IRVestelAc::setAuto | ( | const int8_t | autoLevel | ) |
Set Auto mode/level of the A/C.
[in] | autoLevel | The auto mode/level setting. |
void IRVestelAc::setFan | ( | const uint8_t | fan | ) |
Set the speed of the fan.
[in] | fan | The desired setting. |
void IRVestelAc::setIon | ( | const bool | on | ) |
Set the Ion (Filter) setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRVestelAc::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
[in] | mode | The desired operating mode. |
void IRVestelAc::setOffTimer | ( | const uint16_t | minutes | ) |
Set the Off timer time on the A/C.
[in] | minutes | Time in nr. of minutes. |
void IRVestelAc::setOffTimerActive | ( | const bool | on | ) |
Set the Off timer to be active on the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRVestelAc::setOnTimer | ( | const uint16_t | minutes | ) |
Set the On timer time on the A/C.
[in] | minutes | Time in nr. of minutes. |
void IRVestelAc::setOnTimerActive | ( | const bool | on | ) |
Set the On timer to be active on the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRVestelAc::setPower | ( | const bool | on | ) |
Change the power setting.
[in] | on | true, the setting is on. false, the setting is off. |
void IRVestelAc::setRaw | ( | const uint64_t | newState | ) |
Set the internal state from a valid code for this protocol.
[in] | newState | A valid code for this protocol. |
void IRVestelAc::setRaw | ( | const uint8_t * | newState | ) |
Set the internal state from a valid code for this protocol.
[in] | newState | A valid code for this protocol. |
void IRVestelAc::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 IRVestelAc::setSwing | ( | const bool | on | ) |
Set the Swing Roaming setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRVestelAc::setTemp | ( | const uint8_t | temp | ) |
Set the temperature.
[in] | temp | The temperature in degrees celsius. |
void IRVestelAc::setTime | ( | const uint16_t | minutes | ) |
Set the A/C's internal clock.
[in] | minutes | The time expressed in nr. of minutes past midnight. |
void IRVestelAc::setTimer | ( | const uint16_t | minutes | ) |
Set Timer option of A/C.
[in] | minutes | Nr of minutes the timer is to be set for. |
void IRVestelAc::setTimerActive | ( | const bool | on | ) |
Set the timer to be active on the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRVestelAc::setTurbo | ( | const bool | on | ) |
Set the Turbo setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRVestelAc::stateReset | ( | void | ) |
Reset the state of the remote to a known good state/sequence.
stdAc::state_t IRVestelAc::toCommon | ( | void | ) | const |
Convert the current internal state into its stdAc::state_t equivalent.
|
static |
|
static |
String IRVestelAc::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 state to verify the checksum of. |
|
private |
|
private |
Instance of the IR send class.