| IRremoteESP8266
    | 
Class for handling detailed Mirage 120-bit A/C messages. More...
#include <ir_Mirage.h>

| Public Member Functions | |
| IRMirageAc (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=kMirageMinRepeat) | 
| 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 | 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 speed) | 
| 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... | |
| uint8_t * | getRaw (void) | 
| Get a PTR to the internal state/code for this protocol.  More... | |
| void | setRaw (const uint8_t *data) | 
| Set the internal state from a valid code for this protocol.  More... | |
| uint32_t | getClock (void) const | 
| Get the clock time of the A/C unit.  More... | |
| void | setClock (const uint32_t nr_of_seconds) | 
| Set the clock time on the A/C unit.  More... | |
| void | setTurbo (const bool on) | 
| Change the Turbo setting.  More... | |
| bool | getTurbo (void) const | 
| Get the value of the current Turbo setting.  More... | |
| void | setLight (const bool on) | 
| Change the Light/Display setting.  More... | |
| bool | getLight (void) const | 
| Get the value of the current Light/Display setting.  More... | |
| void | setSleep (const bool on) | 
| Change the Sleep setting.  More... | |
| bool | getSleep (void) const | 
| Get the value of the current Sleep setting.  More... | |
| void | setSwingV (const uint8_t position) | 
| Set the Vertical Swing setting/position of the A/C.  More... | |
| uint8_t | getSwingV (void) const | 
| Get the Vertical Swing setting/position of the A/C.  More... | |
| void | setSwingH (const bool on) | 
| Set the Horizontal Swing setting of the A/C.  More... | |
| bool | getSwingH (void) const | 
| Get the Horizontal Swing setting of the A/C.  More... | |
| void | setQuiet (const bool on) | 
| Set the Quiet setting of the A/C.  More... | |
| bool | getQuiet (void) const | 
| Get the Quiet setting of the A/C.  More... | |
| void | setCleanToggle (const bool on) | 
| Set the CleanToggle setting of the A/C.  More... | |
| bool | getCleanToggle (void) const | 
| Get the Clean Toggle setting of the A/C.  More... | |
| void | setFilter (const bool on) | 
| Set the Filter setting of the A/C.  More... | |
| bool | getFilter (void) const | 
| Get the Filter setting of the A/C.  More... | |
| void | setIFeel (const bool on) | 
| Set the IFeel setting of the A/C.  More... | |
| bool | getIFeel (void) const | 
| Get the IFeel setting of the A/C.  More... | |
| void | setSensorTemp (const uint8_t degrees) | 
| Set the Sensor Temp setting of the A/C's remote.  More... | |
| uint16_t | getSensorTemp (void) const | 
| Get the Sensor Temp setting of the A/C's remote.  More... | |
| uint16_t | getOnTimer (void) const | 
| Get the number of minutes the On Timer is currently set for.  More... | |
| uint16_t | getOffTimer (void) const | 
| Get the number of minutes the Off Timer is currently set for.  More... | |
| void | setOnTimer (const uint16_t nr_of_mins) | 
| Set the number of minutes for the On Timer.  More... | |
| void | setOffTimer (const uint16_t nr_of_mins) | 
| Set the number of minutes for the Off Timer.  More... | |
| mirage_ac_remote_model_t | getModel (const bool useRaw=false) const | 
| Get the model code of the interal message state.  More... | |
| void | setModel (const mirage_ac_remote_model_t model) | 
| Set the model code of the interal message state.  More... | |
| stdAc::state_t | toCommon (void) const | 
| Convert the current internal state into its stdAc::state_t equivalent.  More... | |
| void | fromCommon (const stdAc::state_t state) | 
| Convert & set a stdAc::state_t to its equivalent internal settings.  More... | |
| String | toString (void) const | 
| Convert the internal state into a human readable string.  More... | |
| Static Public Member Functions | |
| static mirage_ac_remote_model_t | getModel (const uint8_t *state) | 
| Guess the Mirage remote model from the supplied state code.  More... | |
| static bool | validChecksum (const uint8_t *data) | 
| Verify the checksum is valid for a given state.  More... | |
| static uint8_t | calculateChecksum (const uint8_t *data) | 
| 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, const mirage_ac_remote_model_t model=mirage_ac_remote_model_t::KKG9AC1) | 
| 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 equivalent.  More... | |
| static stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed, const mirage_ac_remote_model_t model=mirage_ac_remote_model_t::KKG9AC1) | 
| Convert a native fan speed into its stdAc equivalent.  More... | |
| static stdAc::swingv_t | toCommonSwingV (const uint8_t pos) | 
| Convert a native vertical swing postion to it's common equivalent.  More... | |
| Private Member Functions | |
| void | checksum (void) | 
| Calculate and set the checksum values for the internal state.  More... | |
| Private Attributes | |
| IRsend | _irsend | 
| Instance of the IR send class.  More... | |
| Mirage120Protocol | _ | 
| mirage_ac_remote_model_t | _model | 
Class for handling detailed Mirage 120-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 IRMirageAc::begin | ( | void | ) | 
Set up hardware to be able to send a message.
| 
 | static | 
Calculate the checksum for a given state.
| [in] | data | 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. | 
| [in] | model | The model type to use to influence the conversion. | 
| 
 | 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. | 
| void IRMirageAc::fromCommon | ( | const stdAc::state_t | state | ) | 
Convert & set a stdAc::state_t to its equivalent internal settings.
| [in] | state | The desired state in stdAc::state_t form. | 
| bool IRMirageAc::getCleanToggle | ( | void | ) | const | 
Get the Clean Toggle setting of the A/C.
| uint32_t IRMirageAc::getClock | ( | void | ) | const | 
Get the clock time of the A/C unit.
| uint8_t IRMirageAc::getFan | ( | void | ) | const | 
Get the current fan speed setting.
| bool IRMirageAc::getFilter | ( | void | ) | const | 
Get the Filter setting of the A/C.
| bool IRMirageAc::getIFeel | ( | void | ) | const | 
Get the IFeel setting of the A/C.
| bool IRMirageAc::getLight | ( | void | ) | const | 
Get the value of the current Light/Display setting.
| uint8_t IRMirageAc::getMode | ( | void | ) | const | 
Get the operating mode setting of the A/C.
| mirage_ac_remote_model_t IRMirageAc::getModel | ( | const bool | useRaw = false | ) | const | 
Get the model code of the interal message state.
| [in] | useRaw | If set, we try to get the model info from just the state. | 
| 
 | static | 
Guess the Mirage remote model from the supplied state code.
| [in] | state | A valid state code for this protocol. | 
| uint16_t IRMirageAc::getOffTimer | ( | void | ) | const | 
Get the number of minutes the Off Timer is currently set for.
| uint16_t IRMirageAc::getOnTimer | ( | void | ) | const | 
Get the number of minutes the On Timer is currently set for.
| bool IRMirageAc::getPower | ( | void | ) | const | 
Get the value of the current power setting.
| bool IRMirageAc::getQuiet | ( | void | ) | const | 
Get the Quiet setting of the A/C.
| uint8_t * IRMirageAc::getRaw | ( | void | ) | 
Get a PTR to the internal state/code for this protocol.
| uint16_t IRMirageAc::getSensorTemp | ( | void | ) | const | 
Get the Sensor Temp setting of the A/C's remote.
| bool IRMirageAc::getSleep | ( | void | ) | const | 
Get the value of the current Sleep setting.
| bool IRMirageAc::getSwingH | ( | void | ) | const | 
Get the Horizontal Swing setting of the A/C.
| uint8_t IRMirageAc::getSwingV | ( | void | ) | const | 
Get the Vertical Swing setting/position of the A/C.
| uint8_t IRMirageAc::getTemp | ( | void | ) | const | 
Get the current temperature setting.
| bool IRMirageAc::getTurbo | ( | void | ) | const | 
Get the value of the current Turbo setting.
| void IRMirageAc::off | ( | void | ) | 
Set the requested power state of the A/C to off.
| void IRMirageAc::on | ( | void | ) | 
Set the requested power state of the A/C to on.
| void IRMirageAc::send | ( | const uint16_t | repeat = kMirageMinRepeat | ) | 
Send the current internal state as an IR message.
| [in] | repeat | Nr. of times the message will be repeated. | 
| void IRMirageAc::setCleanToggle | ( | const bool | on | ) | 
Set the CleanToggle setting of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. | 
| void IRMirageAc::setClock | ( | const uint32_t | nr_of_seconds | ) | 
Set the clock time on the A/C unit.
| [in] | nr_of_seconds | Nr. of seconds past midnight. | 
| void IRMirageAc::setFan | ( | const uint8_t | speed | ) | 
Set the speed of the fan.
| [in] | speed | The desired setting. | 
| void IRMirageAc::setFilter | ( | const bool | on | ) | 
Set the Filter setting of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. | 
| void IRMirageAc::setIFeel | ( | const bool | on | ) | 
Set the IFeel setting of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. | 
| void IRMirageAc::setLight | ( | const bool | on | ) | 
Change the Light/Display setting.
| [in] | on | true, the setting is on. false, the setting is off. | 
| void IRMirageAc::setMode | ( | const uint8_t | mode | ) | 
Set the operating mode of the A/C.
| [in] | mode | The desired operating mode. | 
| void IRMirageAc::setModel | ( | const mirage_ac_remote_model_t | model | ) | 
Set the model code of the interal message state.
| [in] | model | The desired model to use for the settings. | 
| void IRMirageAc::setOffTimer | ( | const uint16_t | nr_of_mins | ) | 
Set the number of minutes for the Off Timer.
| [in] | nr_of_mins | How long to set the timer for. 0 disables the timer. | 
| void IRMirageAc::setOnTimer | ( | const uint16_t | nr_of_mins | ) | 
Set the number of minutes for the On Timer.
| [in] | nr_of_mins | How long to set the timer for. 0 disables the timer. | 
| void IRMirageAc::setPower | ( | const bool | on | ) | 
Change the power setting.
| [in] | on | true, the setting is on. false, the setting is off. | 
| void IRMirageAc::setQuiet | ( | const bool | on | ) | 
Set the Quiet setting of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. | 
| void IRMirageAc::setRaw | ( | const uint8_t * | data | ) | 
Set the internal state from a valid code for this protocol.
| [in] | data | A valid code for this protocol. | 
| void IRMirageAc::setSensorTemp | ( | const uint8_t | degrees | ) | 
Set the Sensor Temp setting of the A/C's remote.
| [in] | degrees | The desired sensor temp. in degrees celsius. | 
| void IRMirageAc::setSleep | ( | const bool | on | ) | 
Change the Sleep setting.
| [in] | on | true, the setting is on. false, the setting is off. | 
| void IRMirageAc::setSwingH | ( | const bool | on | ) | 
Set the Horizontal Swing setting of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. | 
| void IRMirageAc::setSwingV | ( | const uint8_t | position | ) | 
Set the Vertical Swing setting/position of the A/C.
| [in] | position | The desired swing setting. | 
| void IRMirageAc::setTemp | ( | const uint8_t | degrees | ) | 
Set the temperature.
| [in] | degrees | The temperature in degrees celsius. | 
| void IRMirageAc::setTurbo | ( | const bool | on | ) | 
Change the Turbo setting.
| [in] | on | true, the setting is on. false, the setting is off. | 
| void IRMirageAc::stateReset | ( | void | ) | 
Reset the state of the remote to a known good state/sequence.
| stdAc::state_t IRMirageAc::toCommon | ( | void | ) | const | 
Convert the current internal state into its stdAc::state_t equivalent.
| 
 | static | 
| 
 | static | 
| 
 | static | 
Convert a native vertical swing postion to it's common equivalent.
| [in] | pos | A native position to convert. | 
| String IRMirageAc::toString | ( | void | ) | const | 
Convert the internal state into a human readable string.
| 
 | static | 
Verify the checksum is valid for a given state.
| [in] | data | The array to verify the checksum of. | 
| 
 | private | 
| 
 | private | 
Instance of the IR send class.
| 
 | private | 
 1.8.17
 1.8.17