IRremoteESP8266
|
Class for handling detailed Daikin 64-bit A/C messages. More...
#include <ir_Daikin.h>
Public Member Functions | |
IRDaikin64 (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
Class constructor. More... | |
void | send (const uint16_t repeat=kDaikin64DefaultRepeat) |
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... | |
uint64_t | getRaw () |
Get a copy of the internal state as a valid code for this protocol. More... | |
void | setRaw (const uint64_t new_state) |
Set the internal state from a valid code for this protocol. More... | |
void | setPowerToggle (const bool on) |
Set the Power toggle setting of the A/C. More... | |
bool | getPowerToggle (void) |
Get the Power toggle setting of the A/C. More... | |
void | setTemp (const uint8_t temp) |
Set the temperature. More... | |
uint8_t | getTemp () |
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 | setSwingVertical (const bool on) |
Set the Vertical Swing mode of the A/C. More... | |
bool | getSwingVertical (void) |
Get the Vertical Swing mode of the A/C. More... | |
void | setSleep (const bool on) |
Set the Sleep mode of the A/C. More... | |
bool | getSleep (void) |
Get the Sleep mode of the A/C. More... | |
bool | getQuiet (void) |
Get the Quiet mode status of the A/C. More... | |
void | setQuiet (const bool on) |
Set the Quiet mode of the A/C. More... | |
bool | getTurbo (void) |
Get the Turbo (Powerful) mode status of the A/C. More... | |
void | setTurbo (const bool on) |
Set the Turbo (Powerful) mode of the A/C. More... | |
void | setClock (const uint16_t mins_since_midnight) |
Set the clock on the A/C unit. More... | |
uint16_t | getClock (void) |
Get the clock time to be sent to the A/C unit. More... | |
void | setOnTimeEnabled (const bool on) |
Set the enable status of the On Timer. More... | |
bool | getOnTimeEnabled (void) |
Get the enable status of the On Timer. More... | |
void | setOnTime (const uint16_t mins_since_midnight) |
Set the On Timer time for the A/C unit. More... | |
uint16_t | getOnTime (void) |
Get the On Timer time to be sent to the A/C unit. More... | |
void | setOffTimeEnabled (const bool on) |
Set the enable status of the Off Timer. More... | |
bool | getOffTimeEnabled (void) |
Get the enable status of the Off Timer. More... | |
void | setOffTime (const uint16_t mins_since_midnight) |
Set the Off Timer time for the A/C unit. More... | |
uint16_t | getOffTime (void) |
Get the Off Timer time to be sent to the A/C unit. More... | |
stdAc::state_t | toCommon (const stdAc::state_t *prev=NULL) |
Convert the current internal state into its stdAc::state_t equivilant. More... | |
String | toString (void) |
Convert the current internal state into a human readable string. More... | |
Static Public Member Functions | |
static uint8_t | calcChecksum (const uint64_t state) |
Calculate the checksum for a given state. More... | |
static bool | validChecksum (const uint64_t state) |
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 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 () |
Reset the internal state to a fixed known good state. More... | |
void | checksum () |
Calculate and set the checksum values for the internal state. More... | |
Private Attributes | |
IRsend | _irsend |
instance of the IR send class More... | |
uint64_t | remote_state |
The state of the IR remote. More... | |
Class for handling detailed Daikin 64-bit 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 IRDaikin64::begin | ( | ) |
Set up hardware to be able to send a message.
|
static |
Calculate the checksum for a given state.
[in] | state | The value to calc the checksum of. |
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
private |
Calculate and set the checksum values 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. |
uint16_t IRDaikin64::getClock | ( | void | ) |
Get the clock time to be sent to the A/C unit.
uint8_t IRDaikin64::getFan | ( | void | ) |
Get the current fan speed setting.
uint8_t IRDaikin64::getMode | ( | void | ) |
Get the operating mode setting of the A/C.
uint16_t IRDaikin64::getOffTime | ( | void | ) |
Get the Off Timer time to be sent to the A/C unit.
bool IRDaikin64::getOffTimeEnabled | ( | void | ) |
Get the enable status of the Off Timer.
uint16_t IRDaikin64::getOnTime | ( | void | ) |
Get the On Timer time to be sent to the A/C unit.
bool IRDaikin64::getOnTimeEnabled | ( | void | ) |
Get the enable status of the On Timer.
bool IRDaikin64::getPowerToggle | ( | void | ) |
Get the Power toggle setting of the A/C.
bool IRDaikin64::getQuiet | ( | void | ) |
Get the Quiet mode status of the A/C.
uint64_t IRDaikin64::getRaw | ( | ) |
Get a copy of the internal state as a valid code for this protocol.
bool IRDaikin64::getSleep | ( | void | ) |
Get the Sleep mode of the A/C.
bool IRDaikin64::getSwingVertical | ( | void | ) |
Get the Vertical Swing mode of the A/C.
uint8_t IRDaikin64::getTemp | ( | ) |
Get the current temperature setting.
bool IRDaikin64::getTurbo | ( | void | ) |
Get the Turbo (Powerful) mode status of the A/C.
void IRDaikin64::send | ( | const uint16_t | repeat = kDaikin64DefaultRepeat | ) |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
void IRDaikin64::setClock | ( | const uint16_t | mins_since_midnight | ) |
Set the clock on the A/C unit.
[in] | mins_since_midnight | Nr. of minutes past midnight. |
void IRDaikin64::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
[in] | speed | The desired setting. |
void IRDaikin64::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
[in] | mode | The desired operating mode. |
void IRDaikin64::setOffTime | ( | const uint16_t | mins_since_midnight | ) |
Set the Off Timer time for the A/C unit.
[in] | mins_since_midnight | Nr. of minutes past midnight. |
void IRDaikin64::setOffTimeEnabled | ( | const bool | on | ) |
Set the enable status of the Off Timer.
[in] | on | true, the setting is on. false, the setting is off. |
void IRDaikin64::setOnTime | ( | const uint16_t | mins_since_midnight | ) |
Set the On Timer time for the A/C unit.
[in] | mins_since_midnight | Nr. of minutes past midnight. |
void IRDaikin64::setOnTimeEnabled | ( | const bool | on | ) |
Set the enable status of the On Timer.
[in] | on | true, the setting is on. false, the setting is off. |
void IRDaikin64::setPowerToggle | ( | const bool | on | ) |
Set the Power toggle setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRDaikin64::setQuiet | ( | const bool | on | ) |
Set the Quiet mode of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRDaikin64::setRaw | ( | const uint64_t | new_state | ) |
Set the internal state from a valid code for this protocol.
[in] | new_state | A valid code for this protocol. |
void IRDaikin64::setSleep | ( | const bool | on | ) |
Set the Sleep mode of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRDaikin64::setSwingVertical | ( | const bool | on | ) |
Set the Vertical Swing mode of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRDaikin64::setTemp | ( | const uint8_t | temp | ) |
Set the temperature.
[in] | temp | The temperature in degrees celsius. |
void IRDaikin64::setTurbo | ( | const bool | on | ) |
Set the Turbo (Powerful) mode of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
|
private |
Reset the internal state to a fixed known good state.
stdAc::state_t IRDaikin64::toCommon | ( | const stdAc::state_t * | prev = NULL | ) |
Convert the current internal state into its stdAc::state_t equivilant.
[in] | prev | Ptr to a previous state. |
|
static |
|
static |
String IRDaikin64::toString | ( | void | ) |
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 |
instance of the IR send class
|
private |
The state of the IR remote.