IRremoteESP8266
|
#include <ir_Mitsubishi.h>
Public Member Functions | |
IRMitsubishi112 (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=kMitsubishi112MinRepeat) |
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 off. 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) |
Get the value of the current power setting. More... | |
void | setTemp (const uint8_t degrees) |
Set the temperature. More... | |
uint8_t | getTemp (void) |
Get the current temperature setting. More... | |
void | setFan (const uint8_t speed) |
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 | setSwingV (const uint8_t position) |
Set the Vertical Swing mode of the A/C. More... | |
uint8_t | getSwingV (void) |
Get the Vertical Swing mode of the A/C. More... | |
void | setSwingH (const uint8_t position) |
Set the Horizontal Swing mode of the A/C. More... | |
uint8_t | getSwingH (void) |
Get the Horizontal Swing mode of the A/C. More... | |
void | setQuiet (const bool on) |
Set the Quiet mode of the A/C. More... | |
bool | getQuiet (void) |
Get the Quiet 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) |
Convert the current internal state into its stdAc::state_t equivilant. More... | |
String | toString (void) |
Convert the internal state into a human readable string. More... | |
Static Public Member Functions | |
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::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... | |
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. More... | |
Private Attributes | |
IRsend | _irsend |
Instance of the IR send class. More... | |
uint8_t | remote_state [kMitsubishi112StateLength] |
The state in code form. More... | |
|
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 IRMitsubishi112::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.
|
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. |
uint8_t IRMitsubishi112::getFan | ( | void | ) |
Get the current fan speed setting.
uint8_t IRMitsubishi112::getMode | ( | void | ) |
Get the operating mode setting of the A/C.
bool IRMitsubishi112::getPower | ( | void | ) |
Get the value of the current power setting.
bool IRMitsubishi112::getQuiet | ( | void | ) |
Get the Quiet mode of the A/C.
uint8_t * IRMitsubishi112::getRaw | ( | void | ) |
Get a PTR to the internal state/code for this protocol.
uint8_t IRMitsubishi112::getSwingH | ( | void | ) |
Get the Horizontal Swing mode of the A/C.
uint8_t IRMitsubishi112::getSwingV | ( | void | ) |
Get the Vertical Swing mode of the A/C.
uint8_t IRMitsubishi112::getTemp | ( | void | ) |
Get the current temperature setting.
void IRMitsubishi112::off | ( | void | ) |
Set the requested power state of the A/C to off.
void IRMitsubishi112::on | ( | void | ) |
Set the requested power state of the A/C to off.
void IRMitsubishi112::send | ( | const uint16_t | repeat = kMitsubishi112MinRepeat | ) |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
void IRMitsubishi112::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
[in] | speed | The desired setting. |
void IRMitsubishi112::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
[in] | mode | The desired operating mode. |
void IRMitsubishi112::setPower | ( | const bool | on | ) |
Change the power setting.
[in] | on | true, the setting is on. false, the setting is off. |
void IRMitsubishi112::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 IRMitsubishi112::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 IRMitsubishi112::setSwingH | ( | const uint8_t | position | ) |
Set the Horizontal Swing mode of the A/C.
[in] | position | The position/mode to set the swing to. |
void IRMitsubishi112::setSwingV | ( | const uint8_t | position | ) |
Set the Vertical Swing mode of the A/C.
[in] | position | The position/mode to set the swing to. |
void IRMitsubishi112::setTemp | ( | const uint8_t | degrees | ) |
Set the temperature.
[in] | degrees | The temperature in degrees celsius. |
void IRMitsubishi112::stateReset | ( | void | ) |
Reset the state of the remote to a known good state/sequence.
stdAc::state_t IRMitsubishi112::toCommon | ( | void | ) |
Convert the current internal state into its stdAc::state_t equivilant.
|
static |
|
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 IRMitsubishi112::toString | ( | void | ) |
Convert the internal state into a human readable string.
|
private |
Instance of the IR send class.
|
private |
The state in code form.