IRremoteESP8266
|
Class for handling detailed Argo A/C messages. More...
#include <ir_Argo.h>
Public Member Functions | |
IRArgoAC (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
Class constructor. More... | |
void | send (const uint16_t repeat=kArgoDefaultRepeat) |
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 internal state to have the power on. More... | |
void | off (void) |
Set the internal state to have the power off. More... | |
void | setPower (const bool on) |
Set the internal state to have the desired power. More... | |
bool | getPower (void) const |
Get the power setting from the internal state. More... | |
void | setTemp (const uint8_t degrees) |
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 | setFlap (const uint8_t flap) |
Set the flap position. i.e. Swing. More... | |
uint8_t | getFlap (void) const |
Get the flap position. i.e. Swing. More... | |
void | setMode (const uint8_t mode) |
Set the desired operation mode. More... | |
uint8_t | getMode (void) const |
Get the current operation mode setting. More... | |
void | setMax (const bool on) |
Control the current Max setting. (i.e. Turbo) More... | |
bool | getMax (void) const |
Is the Max (i.e. Turbo) setting on? More... | |
void | setNight (const bool on) |
Turn on/off the Night mode. i.e. Sleep. More... | |
bool | getNight (void) const |
Get the status of Night mode. i.e. Sleep. More... | |
void | setiFeel (const bool on) |
Turn on/off the iFeel mode. More... | |
bool | getiFeel (void) const |
Get the status of iFeel mode. More... | |
void | setTime (void) |
Set the time for the A/C. More... | |
void | setRoomTemp (const uint8_t degrees) |
Set the value for the current room temperature. More... | |
uint8_t | getRoomTemp (void) const |
Get the currently stored value for the room temperature setting. More... | |
uint8_t * | getRaw (void) |
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method. More... | |
void | setRaw (const uint8_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 (void) const |
Convert the current internal state into a human readable string. More... | |
Static Public Member Functions | |
static uint8_t | calcChecksum (const uint8_t state[], const uint16_t length=kArgoStateLength) |
Verify the checksum is valid for a given state. More... | |
static bool | validChecksum (const uint8_t state[], const uint16_t length=kArgoStateLength) |
Verify the checksum is valid 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 uint8_t | convertSwingV (const stdAc::swingv_t position) |
Convert a stdAc::swingv_t enum into it's native setting. 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 Member Functions | |
void | stateReset (void) |
Reset the internals of the object to a known good state. More... | |
void | checksum (void) |
Update the checksum for the internal state. More... | |
Private Attributes | |
IRsend | _irsend |
instance of the IR send class More... | |
ArgoProtocol | _ |
uint8_t | flap_mode |
uint8_t | heat_mode |
uint8_t | cool_mode |
Class for handling detailed Argo 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 IRArgoAC::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
static |
Verify the checksum is valid for a given state.
[in] | state | The array to verify the checksum of. |
[in] | length | The size of the state. |
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
private |
Update the checksum for the internal state.
|
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. |
|
static |
Convert a stdAc::swingv_t enum into it's native setting.
[in] | position | The enum to be converted. |
uint8_t IRArgoAC::getFan | ( | void | ) | const |
Get the current fan speed setting.
uint8_t IRArgoAC::getFlap | ( | void | ) | const |
Get the flap position. i.e. Swing.
bool IRArgoAC::getiFeel | ( | void | ) | const |
Get the status of iFeel mode.
bool IRArgoAC::getMax | ( | void | ) | const |
Is the Max (i.e. Turbo) setting on?
uint8_t IRArgoAC::getMode | ( | void | ) | const |
Get the current operation mode setting.
bool IRArgoAC::getNight | ( | void | ) | const |
Get the status of Night mode. i.e. Sleep.
bool IRArgoAC::getPower | ( | void | ) | const |
Get the power setting from the internal state.
uint8_t * IRArgoAC::getRaw | ( | void | ) |
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
uint8_t IRArgoAC::getRoomTemp | ( | void | ) | const |
Get the currently stored value for the room temperature setting.
uint8_t IRArgoAC::getTemp | ( | void | ) | const |
Get the current temperature setting.
void IRArgoAC::off | ( | void | ) |
Set the internal state to have the power off.
void IRArgoAC::on | ( | void | ) |
Set the internal state to have the power on.
void IRArgoAC::send | ( | const uint16_t | repeat = kArgoDefaultRepeat | ) |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
void IRArgoAC::setFan | ( | const uint8_t | fan | ) |
Set the speed of the fan.
[in] | fan | The desired setting. |
void IRArgoAC::setFlap | ( | const uint8_t | flap | ) |
Set the flap position. i.e. Swing.
[in] | flap | The desired setting. |
void IRArgoAC::setiFeel | ( | const bool | on | ) |
Turn on/off the iFeel mode.
[in] | on | The desired setting. |
void IRArgoAC::setMax | ( | const bool | on | ) |
Control the current Max setting. (i.e. Turbo)
[in] | on | The desired setting. |
void IRArgoAC::setMode | ( | const uint8_t | mode | ) |
Set the desired operation mode.
[in] | mode | The desired operation mode. |
void IRArgoAC::setNight | ( | const bool | on | ) |
Turn on/off the Night mode. i.e. Sleep.
[in] | on | The desired setting. |
void IRArgoAC::setPower | ( | const bool | on | ) |
Set the internal state to have the desired power.
[in] | on | The desired power state. |
void IRArgoAC::setRaw | ( | const uint8_t | state[] | ) |
Set the raw state of the object.
[in] | state | The raw state from the native IR message. |
void IRArgoAC::setRoomTemp | ( | const uint8_t | degrees | ) |
Set the value for the current room temperature.
[in] | degrees | The temperature in degrees celsius. |
void IRArgoAC::setTemp | ( | const uint8_t | degrees | ) |
Set the temperature.
[in] | degrees | The temperature in degrees celsius. |
void IRArgoAC::setTime | ( | void | ) |
Set the time for the A/C.
|
private |
Reset the internals of the object to a known good state.
stdAc::state_t IRArgoAC::toCommon | ( | void | ) | const |
Convert the current internal state into its stdAc::state_t equivilant.
|
static |
|
static |
String IRArgoAC::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 array to verify the checksum of. |
[in] | length | The size of the state. |
|
private |
|
private |
instance of the IR send class
|
private |
|
private |
|
private |