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

Public Member Functions | |
| IRFujitsuAC (const uint16_t pin, const fujitsu_ac_remote_model_t model=ARRAH2E, const bool inverted=false, const bool use_modulation=true) | |
| Class Constructor. More... | |
| void | setModel (const fujitsu_ac_remote_model_t model) |
| Set the currently emulated model of the A/C. More... | |
| fujitsu_ac_remote_model_t | getModel (void) const |
| Get the currently emulated/detected model of the A/C. More... | |
| void | stateReset (void) |
| Reset the state of the remote to a known good state/sequence. More... | |
| void | send (const uint16_t repeat=kFujitsuAcMinRepeat) |
| 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 | stepHoriz (void) |
| Request the A/C to step the Horizontal Swing. More... | |
| void | toggleSwingHoriz (const bool update=true) |
| Request the A/C to toggle the Horizontal Swing mode. More... | |
| void | stepVert (void) |
| Request the A/C to step the Vertical Swing. More... | |
| void | toggleSwingVert (const bool update=true) |
| Request the A/C to toggle the Vertical Swing mode. More... | |
| void | setCmd (const uint8_t cmd) |
| Set the requested (special) command part for the A/C message. More... | |
| uint8_t | getCmd (void) const |
| Set the requested (special) command part for the A/C message. More... | |
| void | setTemp (const float temp, const bool useCelsius=true) |
| Set the temperature. More... | |
| float | getTemp (void) const |
| Get the current temperature setting. More... | |
| void | setFanSpeed (const uint8_t fan) |
| Set the speed of the fan. More... | |
| uint8_t | getFanSpeed (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 | setSwing (const uint8_t mode) |
| Set the requested swing operation mode of the A/C unit. More... | |
| uint8_t | getSwing (void) const |
| Get the requested swing operation mode of the A/C unit. More... | |
| uint8_t * | getRaw (void) |
| Get a PTR to the internal state/code for this protocol. More... | |
| bool | setRaw (const uint8_t newState[], const uint16_t length) |
| Set the internal state from a valid code for this protocol. More... | |
| uint8_t | getStateLength (void) |
| Get the length (size) of the state code for the current configuration. More... | |
| bool | isLongCode (void) const |
| Is the current binary state representation a long or a short code? More... | |
| void | setPower (const bool on) |
| Change the power setting. More... | |
| void | off (void) |
| Set the requested power state of the A/C to off. More... | |
| void | on (void) |
| Set the requested power state of the A/C to on. More... | |
| bool | getPower (void) const |
| Get the value of the current power setting. More... | |
| void | setClean (const bool on) |
| Set the Clean mode of the A/C. More... | |
| bool | getClean (void) const |
| Get the Clean mode status of the A/C. More... | |
| void | setFilter (const bool on) |
| Set the Filter mode status of the A/C. More... | |
| bool | getFilter (void) const |
| Get the Filter mode status of the A/C. More... | |
| void | set10CHeat (const bool on) |
| Set the 10C heat status of the A/C. More... | |
| bool | get10CHeat (void) const |
| Get the 10C heat status of the A/C. More... | |
| void | setOutsideQuiet (const bool on) |
| Set the Outside Quiet mode of the A/C. More... | |
| bool | getOutsideQuiet (void) const |
| Get the Outside Quiet mode status of the A/C. More... | |
| uint8_t | getTimerType (void) const |
| Get the Timer type of the A/C message. More... | |
| void | setTimerType (const uint8_t timertype) |
| Set the Timer type of the A/C message. More... | |
| uint16_t | getOnTimer (void) const |
| Get the On Timer setting of the A/C. More... | |
| void | setOnTimer (const uint16_t nr_mins) |
| Set the On Timer setting of the A/C. More... | |
| uint16_t | getOffSleepTimer (void) const |
| Get the Off/Sleep Timer setting of the A/C. More... | |
| void | setOffTimer (const uint16_t nr_mins) |
| Set the Off Timer time for the A/C. More... | |
| void | setSleepTimer (const uint16_t nr_mins) |
| Set the Sleep Timer time for the A/C. More... | |
| void | setId (const uint8_t num) |
| Set the device's remote ID number. More... | |
| uint8_t | getId (void) const |
| Get the current device's remote ID number. More... | |
| void | setCelsius (const bool on) |
| Set the Temperature units for the A/C. More... | |
| bool | getCelsius (void) const |
| Get the Clean mode status of the A/C. More... | |
| stdAc::state_t | toCommon (const stdAc::state_t *prev=NULL) |
| 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 (uint8_t *state, const uint16_t length) |
| 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 (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 and set the checksum values for the internal state. More... | |
| bool | updateUseLongOrShort (void) |
| Update the length (size) of the state code for the current configuration. More... | |
| void | buildFromState (const uint16_t length) |
| Build the internal state/config from the current (raw) A/C message. More... | |
| void | setOffSleepTimer (const uint16_t nr_mins) |
| Set the Off/Sleep Timer time for the A/C. More... | |
Private Attributes | |
| IRsend | _irsend |
| Instance of the IR send class. More... | |
| FujitsuProtocol | _ |
| uint8_t | _cmd |
| fujitsu_ac_remote_model_t | _model |
| uint8_t | _state_length |
| uint8_t | _state_length_short |
| bool | _rawstatemodified |
Class for handling detailed Fujitsu A/C messages.
|
explicit |
Class Constructor.
| [in] | pin | GPIO to be used when sending. |
| [in] | model | The enum for the model of A/C to be emulated. |
| [in] | inverted | Is the output signal to be inverted? |
| [in] | use_modulation | Is frequency modulation to be used? |
| void IRFujitsuAC::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
private |
Build the internal state/config from the current (raw) A/C message.
| [in] | length | Size of the current/used (raw) A/C message array. |
|
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. |
| bool IRFujitsuAC::get10CHeat | ( | void | ) | const |
Get the 10C heat status of the A/C.
| bool IRFujitsuAC::getCelsius | ( | void | ) | const |
Get the Clean mode status of the A/C.
| bool IRFujitsuAC::getClean | ( | void | ) | const |
Get the Clean mode status of the A/C.
| uint8_t IRFujitsuAC::getCmd | ( | void | ) | const |
Set the requested (special) command part for the A/C message.
| uint8_t IRFujitsuAC::getFanSpeed | ( | void | ) | const |
Get the current fan speed setting.
| bool IRFujitsuAC::getFilter | ( | void | ) | const |
Get the Filter mode status of the A/C.
| uint8_t IRFujitsuAC::getId | ( | void | ) | const |
Get the current device's remote ID number.
| uint8_t IRFujitsuAC::getMode | ( | void | ) | const |
Get the operating mode setting of the A/C.
| fujitsu_ac_remote_model_t IRFujitsuAC::getModel | ( | void | ) | const |
Get the currently emulated/detected model of the A/C.
| uint16_t IRFujitsuAC::getOffSleepTimer | ( | void | ) | const |
Get the Off/Sleep Timer setting of the A/C.
| uint16_t IRFujitsuAC::getOnTimer | ( | void | ) | const |
Get the On Timer setting of the A/C.
| bool IRFujitsuAC::getOutsideQuiet | ( | void | ) | const |
Get the Outside Quiet mode status of the A/C.
| bool IRFujitsuAC::getPower | ( | void | ) | const |
Get the value of the current power setting.
| uint8_t * IRFujitsuAC::getRaw | ( | void | ) |
Get a PTR to the internal state/code for this protocol.
| uint8_t IRFujitsuAC::getStateLength | ( | void | ) |
Get the length (size) of the state code for the current configuration.
| uint8_t IRFujitsuAC::getSwing | ( | void | ) | const |
Get the requested swing operation mode of the A/C unit.
| float IRFujitsuAC::getTemp | ( | void | ) | const |
Get the current temperature setting.
| uint8_t IRFujitsuAC::getTimerType | ( | void | ) | const |
Get the Timer type of the A/C message.
| bool IRFujitsuAC::isLongCode | ( | void | ) | const |
Is the current binary state representation a long or a short code?
| void IRFujitsuAC::off | ( | void | ) |
Set the requested power state of the A/C to off.
| void IRFujitsuAC::on | ( | void | ) |
Set the requested power state of the A/C to on.
| void IRFujitsuAC::send | ( | const uint16_t | repeat = kFujitsuAcMinRepeat | ) |
Send the current internal state as an IR message.
| [in] | repeat | Nr. of times the message will be repeated. |
| void IRFujitsuAC::set10CHeat | ( | const bool | on | ) |
Set the 10C heat status of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRFujitsuAC::setCelsius | ( | const bool | on | ) |
Set the Temperature units for the A/C.
| [in] | on | true, use Celsius. false, use Fahrenheit. |
| void IRFujitsuAC::setClean | ( | const bool | on | ) |
Set the Clean mode of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRFujitsuAC::setCmd | ( | const uint8_t | cmd | ) |
Set the requested (special) command part for the A/C message.
| [in] | cmd | The special command code. |
| void IRFujitsuAC::setFanSpeed | ( | const uint8_t | fanSpeed | ) |
Set the speed of the fan.
| [in] | fanSpeed | The desired setting. |
| void IRFujitsuAC::setFilter | ( | const bool | on | ) |
Set the Filter mode status of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRFujitsuAC::setId | ( | const uint8_t | num | ) |
Set the device's remote ID number.
| [in] | num | The ID for the remote. Valid number range is 0 to 3. |
| void IRFujitsuAC::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
| [in] | mode | The desired operating mode. |
| void IRFujitsuAC::setModel | ( | const fujitsu_ac_remote_model_t | model | ) |
Set the currently emulated model of the A/C.
| [in] | model | An enum representing the model to support/emulate. |
|
inlineprivate |
Set the Off/Sleep Timer time for the A/C.
| [in] | nr_mins | Nr. of minutes to set the timer to. 0 means disabled. |
| void IRFujitsuAC::setOffTimer | ( | const uint16_t | nr_mins | ) |
Set the Off Timer time for the A/C.
| [in] | nr_mins | Nr. of minutes to set the timer to. 0 means disabled. |
| void IRFujitsuAC::setOnTimer | ( | const uint16_t | nr_mins | ) |
Set the On Timer setting of the A/C.
| [in] | nr_mins | Nr. of minutes to set the timer to. 0 means disabled. |
| void IRFujitsuAC::setOutsideQuiet | ( | const bool | on | ) |
Set the Outside Quiet mode of the A/C.
| [in] | on | true, the setting is on. false, the setting is off. |
| void IRFujitsuAC::setPower | ( | const bool | on | ) |
Change the power setting.
| [in] | on | true, the setting is on. false, the setting is off. |
| bool IRFujitsuAC::setRaw | ( | const uint8_t | newState[], |
| const uint16_t | length | ||
| ) |
Set the internal state from a valid code for this protocol.
| [in] | newState | A valid code for this protocol. |
| [in] | length | Size of the newState array. |
| void IRFujitsuAC::setSleepTimer | ( | const uint16_t | nr_mins | ) |
Set the Sleep Timer time for the A/C.
| [in] | nr_mins | Nr. of minutes to set the timer to. 0 means disabled. |
| void IRFujitsuAC::setSwing | ( | const uint8_t | swingMode | ) |
Set the requested swing operation mode of the A/C unit.
| [in] | swingMode | The swingMode code for the A/C. Vertical, Horizon, or Both. See constants for details. |
| void IRFujitsuAC::setTemp | ( | const float | temp, |
| const bool | useCelsius = true |
||
| ) |
Set the temperature.
| [in] | temp | The temperature in degrees. |
| [in] | useCelsius | Use Celsius or Fahrenheit? |
| void IRFujitsuAC::setTimerType | ( | const uint8_t | timertype | ) |
Set the Timer type of the A/C message.
| [in] | timertype | The kind of timer to use for the message. |
| void IRFujitsuAC::stateReset | ( | void | ) |
Reset the state of the remote to a known good state/sequence.
| void IRFujitsuAC::stepHoriz | ( | void | ) |
Request the A/C to step the Horizontal Swing.
| void IRFujitsuAC::stepVert | ( | void | ) |
Request the A/C to step the Vertical Swing.
| stdAc::state_t IRFujitsuAC::toCommon | ( | const stdAc::state_t * | prev = NULL | ) |
Convert the current internal state into its stdAc::state_t equivalent.
| [in] | prev | Ptr to a previous state. |
|
static |
|
static |
| void IRFujitsuAC::toggleSwingHoriz | ( | const bool | update = true | ) |
Request the A/C to toggle the Horizontal Swing mode.
| [in] | update | Do we need to update the general swing config? |
| void IRFujitsuAC::toggleSwingVert | ( | const bool | update = true | ) |
Request the A/C to toggle the Vertical Swing mode.
| [in] | update | Do we need to update the general swing config? |
| String IRFujitsuAC::toString | ( | void | ) | const |
Convert the current internal state into a human readable string.
|
private |
Update the length (size) of the state code for the current configuration.
|
static |
Verify the checksum is valid for a given state.
| [in] | state | The array to verify the checksum of. |
| [in] | length | The length of the state array. |
|
private |
|
private |
|
private |
Instance of the IR send class.
|
private |
|
private |
|
private |
|
private |
1.8.17