|
IRremoteESP8266
|
Class for handling detailed Corona A/C messages. More...
#include <ir_Corona.h>

Public Member Functions | |
| IRCoronaAc (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
| Class constructor for handling detailed Corona A/C messages. More... | |
| void | stateReset () |
| Reset the internal state to a fixed known good state. 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 () |
| Set up hardware to be able to send a message. More... | |
| void | setPower (const bool on) |
| Change the power setting. (in practice Standby, remote power) More... | |
| bool | getPower (void) const |
| Get the current power setting. (in practice Standby, remote power) More... | |
| bool | getPowerButton (void) const |
| Get the value of the current power button setting. More... | |
| void | on (void) |
| Change the power setting to On. More... | |
| void | off (void) |
| Change the power setting to Off. More... | |
| void | setTemp (const uint8_t temp) |
| Set the temp in deg C. More... | |
| uint8_t | getTemp (void) const |
| Get the current temperature from the internal state. More... | |
| void | setSwingVToggle (const bool on) |
| Set the Vertical Swing toggle setting. More... | |
| bool | getSwingVToggle (void) const |
| Get the Vertical Swing toggle setting. More... | |
| void | setFan (const uint8_t speed) |
| Set the operating speed of the A/C Fan. More... | |
| uint8_t | getFan (void) const |
| Get the operating speed of the A/C Fan. 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 | setEcono (const bool on) |
| Change the powersave setting. More... | |
| bool | getEcono (void) const |
| Get the value of the current powersave setting. More... | |
| void | setOnTimer (const uint16_t nr_of_mins) |
| Set the On Timer time. More... | |
| uint16_t | getOnTimer (void) const |
| Get the current On Timer time. More... | |
| void | setOffTimer (const uint16_t nr_of_mins) |
| Set the Off Timer time. More... | |
| uint16_t | getOffTimer (void) const |
| Get the current Off Timer time. More... | |
| uint8_t * | getRaw () |
| Get a copy of the internal state as a valid code for this protocol. More... | |
| void | setRaw (const uint8_t new_code[], const uint16_t length=kCoronaAcStateLength) |
| Set the internal state from a valid code for this protocol. More... | |
| stdAc::state_t | toCommon (void) const |
| Convert the A/C state to it's common stdAc::state_t equivalent. More... | |
| String | toString (void) const |
| Convert the internal state into a human readable string. More... | |
Static Public Member Functions | |
| static bool | validSection (const uint8_t state[], const uint16_t pos, const uint8_t section) |
| Check that a CoronaAc Section part is valid with section byte and inverted. More... | |
| static uint8_t | convertMode (const stdAc::opmode_t mode) |
| Convert a standard A/C mode into its native mode. More... | |
| static uint8_t | convertFan (const stdAc::fanspeed_t speed) |
| Convert a standard A/C Fan speed into its native fan speed. More... | |
| static stdAc::opmode_t | toCommonMode (const uint8_t mode) |
| Convert a native mode to it's common stdAc::opmode_t equivalent. More... | |
| static stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed) |
| Convert a native fan speed to it's common equivalent. More... | |
Private Member Functions | |
| void | setPowerButton (const bool on) |
| Change the power button setting. More... | |
| void | _setTimer (const uint8_t section, const uint16_t nr_of_mins) |
| Set the Timer time. More... | |
| uint16_t | _getTimer (const uint8_t section) const |
| Get the current Timer time. More... | |
Static Private Member Functions | |
| static uint8_t | getSectionByte (const uint8_t section) |
| Get the byte that identifies the section. More... | |
| static void | checksum (uint8_t *data) |
| Calculate and set the check values for the internal state. More... | |
Private Attributes | |
| IRsend | _irsend |
| Instance of the IR send class. More... | |
| CoronaProtocol | _ |
Class for handling detailed Corona A/C messages.
|
explicit |
Class constructor for handling detailed Corona A/C messages.
| [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? |
|
private |
Get the current Timer time.
|
private |
Set the Timer time.
| [in] | section | index of section, used for offset. |
| [in] | nr_of_mins | Number of minutes to set the timer to. (non in range value is disable). Valid is from 1 minute to 12 hours |
| void IRCoronaAc::begin | ( | ) |
Set up hardware to be able to send a message.
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
staticprivate |
Calculate and set the check values for the internal state.
| [in,out] | data | The array to be modified |
|
static |
Convert a standard A/C Fan speed into its native fan speed.
| [in] | speed | The desired stdAc::fanspeed_t fan speed |
|
static |
Convert a standard A/C mode into its native mode.
| [in] | mode | A stdAc::opmode_t mode to be converted to it's native equivalent |
| bool IRCoronaAc::getEcono | ( | void | ) | const |
Get the value of the current powersave setting.
| uint8_t IRCoronaAc::getFan | ( | void | ) | const |
Get the operating speed of the A/C Fan.
| uint8_t IRCoronaAc::getMode | ( | void | ) | const |
Get the operating mode setting of the A/C.
| uint16_t IRCoronaAc::getOffTimer | ( | void | ) | const |
Get the current Off Timer time.
| uint16_t IRCoronaAc::getOnTimer | ( | void | ) | const |
Get the current On Timer time.
| bool IRCoronaAc::getPower | ( | void | ) | const |
Get the current power setting. (in practice Standby, remote power)
| bool IRCoronaAc::getPowerButton | ( | void | ) | const |
Get the value of the current power button setting.
| uint8_t * IRCoronaAc::getRaw | ( | ) |
Get a copy of the internal state as a valid code for this protocol.
|
staticprivate |
Get the byte that identifies the section.
| [in] | section | Index of the section 0-2, 3 and above is used as the special case for short message |
| bool IRCoronaAc::getSwingVToggle | ( | void | ) | const |
Get the Vertical Swing toggle setting.
| uint8_t IRCoronaAc::getTemp | ( | void | ) | const |
Get the current temperature from the internal state.
| void IRCoronaAc::off | ( | void | ) |
Change the power setting to Off.
| void IRCoronaAc::on | ( | void | ) |
Change the power setting to On.
| void IRCoronaAc::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 IRCoronaAc::setEcono | ( | const bool | on | ) |
Change the powersave setting.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRCoronaAc::setFan | ( | const uint8_t | speed | ) |
Set the operating speed of the A/C Fan.
| [in] | speed | The desired fan speed |
| void IRCoronaAc::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
| [in] | mode | The desired operating mode. |
| void IRCoronaAc::setOffTimer | ( | const uint16_t | nr_of_mins | ) |
Set the Off Timer time.
| [in] | nr_of_mins | Number of minutes to set the timer to. (0 or kCoronaAcTimerOff is disable). |
| void IRCoronaAc::setOnTimer | ( | const uint16_t | nr_of_mins | ) |
Set the On Timer time.
| [in] | nr_of_mins | Number of minutes to set the timer to. (0 or kCoronaAcTimerOff is disable). |
| void IRCoronaAc::setPower | ( | const bool | on | ) |
Change the power setting. (in practice Standby, remote power)
| [in] | on | true, the setting is on. false, the setting is off. |
|
private |
Change the power button setting.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRCoronaAc::setRaw | ( | const uint8_t | new_code[], |
| const uint16_t | length = kCoronaAcStateLength |
||
| ) |
Set the internal state from a valid code for this protocol.
| [in] | new_code | A valid state for this protocol. |
| [in] | length | of the new_code array. |
| void IRCoronaAc::setSwingVToggle | ( | const bool | on | ) |
Set the Vertical Swing toggle setting.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRCoronaAc::setTemp | ( | const uint8_t | temp | ) |
Set the temp in deg C.
| [in] | temp | The desired temperature in Celsius. |
| void IRCoronaAc::stateReset | ( | ) |
Reset the internal state to a fixed known good state.
| stdAc::state_t IRCoronaAc::toCommon | ( | void | ) | const |
Convert the A/C state to it's common stdAc::state_t equivalent.
|
static |
Convert a native fan speed to it's common equivalent.
| [in] | speed | The desired native fan speed |
|
static |
Convert a native mode to it's common stdAc::opmode_t equivalent.
| [in] | mode | A native operation mode to be converted. |
| String IRCoronaAc::toString | ( | void | ) | const |
Convert the internal state into a human readable string.
|
static |
Check that a CoronaAc Section part is valid with section byte and inverted.
| [in] | state | An array of bytes containing the section |
| [in] | pos | Where to start in the state array |
| [in] | section | Which section to work with Used to get the section byte, and is validated against pos |
|
private |
|
private |
Instance of the IR send class.
1.8.17