IRremoteESP8266
|
Class for handling detailed Mitsubishi Heavy 88-bit A/C messages. More...
#include <ir_MitsubishiHeavy.h>
Public Member Functions | |
IRMitsubishiHeavy88Ac (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=kMitsubishiHeavy88MinRepeat) |
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 temp) |
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 | 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 | setSwingVertical (const uint8_t pos) |
Set the Vertical Swing mode of the A/C. More... | |
uint8_t | getSwingVertical (void) const |
Get the Vertical Swing mode of the A/C. More... | |
void | setSwingHorizontal (const uint8_t pos) |
Set the Horizontal Swing mode of the A/C. More... | |
uint8_t | getSwingHorizontal (void) const |
Get the Horizontal Swing mode of the A/C. More... | |
void | setTurbo (const bool on) |
Set the Turbo mode of the A/C. More... | |
bool | getTurbo (void) const |
Get the Turbo mode of the A/C. More... | |
void | setEcono (const bool on) |
Set the Economical mode of the A/C. More... | |
bool | getEcono (void) const |
Get the Economical mode of the A/C. More... | |
void | set3D (const bool on) |
Set the 3D mode of the A/C. More... | |
bool | get3D (void) const |
Get the 3D mode of the A/C. More... | |
void | setClean (const bool on) |
Set the Clean mode of the A/C. More... | |
bool | getClean (void) const |
Get the Clean mode 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... | |
stdAc::state_t | toCommon (void) const |
Convert the current internal state into its 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 | checkZjsSig (const uint8_t *state) |
Verify the given state has a ZJ-S signature. More... | |
static bool | validChecksum (const uint8_t *state, const uint16_t length=kMitsubishiHeavy88StateLength) |
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 uint8_t | convertSwingH (const stdAc::swingh_t position) |
Convert a stdAc::swingh_t enum into it's native setting. More... | |
static stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed) |
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... | |
static stdAc::swingh_t | toCommonSwingH (const uint8_t pos) |
Convert a native horizontal swing postion to it's common equivalent. More... | |
Private Member Functions | |
void | checksum (void) |
Calculate the checksum for the current internal state of the remote. Note: Technically it has no checksum, but does have inverted byte pairs. More... | |
Private Attributes | |
IRsend | _irsend |
Instance of the IR send class. More... | |
Mitsubishi88Protocol | _ |
Class for handling detailed Mitsubishi Heavy 88-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 IRMitsubishiHeavy88Ac::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
private |
Calculate the checksum for the current internal state of the remote. Note: Technically it has no checksum, but does have inverted byte pairs.
|
static |
Verify the given state has a ZJ-S signature.
[in] | state | A ptr to a state to be checked. |
|
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::swingh_t enum into it's native setting.
[in] | position | The enum to be converted. |
|
static |
Convert a stdAc::swingv_t enum into it's native setting.
[in] | position | The enum to be converted. |
bool IRMitsubishiHeavy88Ac::get3D | ( | void | ) | const |
Get the 3D mode of the A/C.
bool IRMitsubishiHeavy88Ac::getClean | ( | void | ) | const |
Get the Clean mode of the A/C.
bool IRMitsubishiHeavy88Ac::getEcono | ( | void | ) | const |
Get the Economical mode of the A/C.
uint8_t IRMitsubishiHeavy88Ac::getFan | ( | void | ) | const |
Get the current fan speed setting.
uint8_t IRMitsubishiHeavy88Ac::getMode | ( | void | ) | const |
Get the operating mode setting of the A/C.
bool IRMitsubishiHeavy88Ac::getPower | ( | void | ) | const |
Get the value of the current power setting.
uint8_t * IRMitsubishiHeavy88Ac::getRaw | ( | void | ) |
Get a PTR to the internal state/code for this protocol.
uint8_t IRMitsubishiHeavy88Ac::getSwingHorizontal | ( | void | ) | const |
Get the Horizontal Swing mode of the A/C.
uint8_t IRMitsubishiHeavy88Ac::getSwingVertical | ( | void | ) | const |
Get the Vertical Swing mode of the A/C.
uint8_t IRMitsubishiHeavy88Ac::getTemp | ( | void | ) | const |
Get the current temperature setting.
bool IRMitsubishiHeavy88Ac::getTurbo | ( | void | ) | const |
Get the Turbo mode of the A/C.
void IRMitsubishiHeavy88Ac::off | ( | void | ) |
Set the requested power state of the A/C to off.
void IRMitsubishiHeavy88Ac::on | ( | void | ) |
Set the requested power state of the A/C to on.
void IRMitsubishiHeavy88Ac::send | ( | const uint16_t | repeat = kMitsubishiHeavy88MinRepeat | ) |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
void IRMitsubishiHeavy88Ac::set3D | ( | const bool | on | ) |
Set the 3D mode of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRMitsubishiHeavy88Ac::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 IRMitsubishiHeavy88Ac::setEcono | ( | const bool | on | ) |
Set the Economical mode of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRMitsubishiHeavy88Ac::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
[in] | speed | The desired setting. |
void IRMitsubishiHeavy88Ac::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
[in] | mode | The desired operating mode. |
void IRMitsubishiHeavy88Ac::setPower | ( | const bool | on | ) |
Change the power setting.
[in] | on | true, the setting is on. false, the setting is off. |
void IRMitsubishiHeavy88Ac::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 IRMitsubishiHeavy88Ac::setSwingHorizontal | ( | const uint8_t | pos | ) |
Set the Horizontal Swing mode of the A/C.
[in] | pos | The position/mode to set the swing to. |
void IRMitsubishiHeavy88Ac::setSwingVertical | ( | const uint8_t | pos | ) |
Set the Vertical Swing mode of the A/C.
[in] | pos | The position/mode to set the swing to. |
void IRMitsubishiHeavy88Ac::setTemp | ( | const uint8_t | temp | ) |
Set the temperature.
[in] | temp | The temperature in degrees celsius. |
void IRMitsubishiHeavy88Ac::setTurbo | ( | const bool | on | ) |
Set the Turbo mode of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRMitsubishiHeavy88Ac::stateReset | ( | void | ) |
Reset the state of the remote to a known good state/sequence.
stdAc::state_t IRMitsubishiHeavy88Ac::toCommon | ( | void | ) | const |
Convert the current internal state into its stdAc::state_t equivalent.
|
static |
|
static |
Convert a native horizontal swing postion to it's common equivalent.
[in] | pos | A native position to convert. |
|
static |
Convert a native vertical swing postion to it's common equivalent.
[in] | pos | A native position to convert. |
String IRMitsubishiHeavy88Ac::toString | ( | void | ) | const |
Convert the 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 length/size of the state array. |
|
private |
|
private |
Instance of the IR send class.