# IRremoteESP8266: src/ir_MitsubishiHeavy.h Source File

ir_MitsubishiHeavy.h
Go to the documentation of this file.
// Copyright 2019 David Conran
// Supports:
// Brand: Mitsubishi Heavy Industries, Model: RLA502A700B remote (152 bit)
// Brand: Mitsubishi Heavy Industries, Model: SRKxxZM-S A/C (152 bit)
// Brand: Mitsubishi Heavy Industries, Model: SRKxxZMXA-S A/C (152 bit)
// Brand: Mitsubishi Heavy Industries, Model: RKX502A001C remote (88 bit)
// Brand: Mitsubishi Heavy Industries, Model: SRKxxZJ-S A/C (88 bit)
#ifndef IR_MITSUBISHIHEAVY_H_
#define IR_MITSUBISHIHEAVY_H_
#ifndef UNIT_TEST
#include <Arduino.h>
#endif
#include "IRremoteESP8266.h"
#include "IRsend.h"
#ifdef UNIT_TEST
#include "IRsend_test.h"
#endif
union Mitsubishi152Protocol{
uint8_t raw[kMitsubishiHeavy152StateLength];
struct {
// Byte 0~4
uint8_t Sig[5];
// Byte 5
uint8_t Mode :3;
uint8_t Power :1;
uint8_t :1;
uint8_t Clean :1;
uint8_t Filter:1;
uint8_t :1;
// Byte 6
uint8_t :8;
// Byte 7
uint8_t Temp :4;
uint8_t :4;
// Byte 8
uint8_t :8;
// Byte 9
uint8_t Fan :4;
uint8_t :4;
// Byte 10
uint8_t :8;
// Byte 11
uint8_t :1;
uint8_t Three :1;
uint8_t :2;
uint8_t D :1; // binding with "Three"
uint8_t SwingV :3;
// Byte 12
uint8_t :8;
// Byte 13
uint8_t SwingH :4;
uint8_t :4;
// Byte 14
uint8_t :8;
// Byte 15
uint8_t :6;
uint8_t Night :1;
uint8_t Silent :1;
};
};
// Constants.
const uint8_t kMitsubishiHeavySigLength = 5;
// ZMS (152 bit)
const uint8_t kMitsubishiHeavyZmsSig[kMitsubishiHeavySigLength] = {
0xAD, 0x51, 0x3C, 0xE5, 0x1A};
const uint8_t kMitsubishiHeavyAuto = 0; // 0b000
const uint8_t kMitsubishiHeavyCool = 1; // 0b001
const uint8_t kMitsubishiHeavyDry = 2; // 0b010
const uint8_t kMitsubishiHeavyFan = 3; // 0b011
const uint8_t kMitsubishiHeavyHeat = 4; // 0b100
const uint8_t kMitsubishiHeavyMinTemp = 17; // 17C
const uint8_t kMitsubishiHeavyMaxTemp = 31; // 31C
const uint8_t kMitsubishiHeavy152FanAuto = 0x0; // 0b0000
const uint8_t kMitsubishiHeavy152FanLow = 0x1; // 0b0001
const uint8_t kMitsubishiHeavy152FanMed = 0x2; // 0b0010
const uint8_t kMitsubishiHeavy152FanHigh = 0x3; // 0b0011
const uint8_t kMitsubishiHeavy152FanMax = 0x4; // 0b0100
const uint8_t kMitsubishiHeavy152FanEcono = 0x6; // 0b0110
const uint8_t kMitsubishiHeavy152FanTurbo = 0x8; // 0b1000
const uint8_t kMitsubishiHeavy152SwingVAuto = 0; // 0b000
const uint8_t kMitsubishiHeavy152SwingVHighest = 1; // 0b001
const uint8_t kMitsubishiHeavy152SwingVHigh = 2; // 0b010
const uint8_t kMitsubishiHeavy152SwingVMiddle = 3; // 0b011
const uint8_t kMitsubishiHeavy152SwingVLow = 4; // 0b100
const uint8_t kMitsubishiHeavy152SwingVLowest = 5; // 0b101
const uint8_t kMitsubishiHeavy152SwingVOff = 6; // 0b110
const uint8_t kMitsubishiHeavy152SwingHAuto = 0; // 0b0000
const uint8_t kMitsubishiHeavy152SwingHLeftMax = 1; // 0b0001
const uint8_t kMitsubishiHeavy152SwingHLeft = 2; // 0b0010
const uint8_t kMitsubishiHeavy152SwingHMiddle = 3; // 0b0011
const uint8_t kMitsubishiHeavy152SwingHRight = 4; // 0b0100
const uint8_t kMitsubishiHeavy152SwingHRightMax = 5; // 0b0101
const uint8_t kMitsubishiHeavy152SwingHRightLeft = 6; // 0b0110
const uint8_t kMitsubishiHeavy152SwingHLeftRight = 7; // 0b0111
const uint8_t kMitsubishiHeavy152SwingHOff = 8; // 0b1000
union Mitsubishi88Protocol{
uint8_t raw[kMitsubishiHeavy88StateLength];
struct {
// Byte 0~4
uint8_t Sig[5];
// Byte 5
uint8_t :1;
uint8_t SwingV5 :1;
uint8_t SwingH1 :2;
uint8_t :1;
uint8_t Clean :1;
uint8_t SwingH2 :2;
// Byte 6
uint8_t :8;
// Byte 7
uint8_t :3;
uint8_t SwingV7 :2;
uint8_t Fan :3;
// Byte 8
uint8_t :8;
// Byte 9
uint8_t Mode :3;
uint8_t Power :1;
uint8_t Temp :4;
};
};
// ZJS (88 bit)
const uint8_t kMitsubishiHeavyZjsSig[kMitsubishiHeavySigLength] = {
0xAD, 0x51, 0x3C, 0xD9, 0x26};
const uint8_t kMitsubishiHeavy88SwingHSize = 2; // Bits (per offset)
const uint8_t kMitsubishiHeavy88SwingHOff = 0b0000;
const uint8_t kMitsubishiHeavy88SwingHAuto = 0b1000;
const uint8_t kMitsubishiHeavy88SwingHLeftMax = 0b0001;
const uint8_t kMitsubishiHeavy88SwingHLeft = 0b0101;
const uint8_t kMitsubishiHeavy88SwingHMiddle = 0b1001;
const uint8_t kMitsubishiHeavy88SwingHRight = 0b1101;
const uint8_t kMitsubishiHeavy88SwingHRightMax = 0b0010;
const uint8_t kMitsubishiHeavy88SwingHRightLeft = 0b1010;
const uint8_t kMitsubishiHeavy88SwingHLeftRight = 0b0110;
const uint8_t kMitsubishiHeavy88SwingH3D = 0b1110;
const uint8_t kMitsubishiHeavy88FanAuto = 0; // 0b000
const uint8_t kMitsubishiHeavy88FanLow = 2; // 0b010
const uint8_t kMitsubishiHeavy88FanMed = 3; // 0b011
const uint8_t kMitsubishiHeavy88FanHigh = 4; // 0b100
const uint8_t kMitsubishiHeavy88FanTurbo = 6; // 0b110
const uint8_t kMitsubishiHeavy88FanEcono = 7; // 0b111
const uint8_t kMitsubishiHeavy88SwingVByte5Size = 1;
// Mask 0b111
const uint8_t kMitsubishiHeavy88SwingVOff = 0b000; // 0
const uint8_t kMitsubishiHeavy88SwingVAuto = 0b100; // 4
const uint8_t kMitsubishiHeavy88SwingVHighest = 0b110; // 6
const uint8_t kMitsubishiHeavy88SwingVHigh = 0b001; // 1
const uint8_t kMitsubishiHeavy88SwingVMiddle = 0b011; // 3
const uint8_t kMitsubishiHeavy88SwingVLow = 0b101; // 5
const uint8_t kMitsubishiHeavy88SwingVLowest = 0b111; // 7
// Classes
class IRMitsubishiHeavy152Ac {
public:
explicit IRMitsubishiHeavy152Ac(const uint16_t pin,
const bool inverted = false,
const bool use_modulation = true);
void stateReset(void);
#if SEND_MITSUBISHIHEAVY
void send(const uint16_t repeat = kMitsubishiHeavy152MinRepeat);
int8_t calibrate(void) { return _irsend.calibrate(); }
#endif // SEND_MITSUBISHIHEAVY
void begin(void);
void on(void);
void off(void);
void setPower(const bool on);
bool getPower(void) const;
void setTemp(const uint8_t temp);
uint8_t getTemp(void) const;
void setFan(const uint8_t fan);
uint8_t getFan(void) const;
void setMode(const uint8_t mode);
uint8_t getMode(void) const;
void setSwingVertical(const uint8_t pos);
uint8_t getSwingVertical(void) const;
void setSwingHorizontal(const uint8_t pos);
uint8_t getSwingHorizontal(void) const;
void setNight(const bool on);
bool getNight(void) const;
void set3D(const bool on);
bool get3D(void) const;
void setSilent(const bool on);
bool getSilent(void) const;
void setFilter(const bool on);
bool getFilter(void) const;
void setClean(const bool on);
bool getClean(void) const;
void setTurbo(const bool on);
bool getTurbo(void) const;
void setEcono(const bool on);
bool getEcono(void) const;
uint8_t* getRaw(void);
void setRaw(const uint8_t* data);
static bool checkZmsSig(const uint8_t *state);
static bool validChecksum(
const uint8_t *state,
const uint16_t length = kMitsubishiHeavy152StateLength);
static uint8_t convertMode(const stdAc::opmode_t mode);
static uint8_t convertFan(const stdAc::fanspeed_t speed);
static uint8_t convertSwingV(const stdAc::swingv_t position);
static uint8_t convertSwingH(const stdAc::swingh_t position);
static stdAc::opmode_t toCommonMode(const uint8_t mode);
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
static stdAc::swingv_t toCommonSwingV(const uint8_t pos);
static stdAc::swingh_t toCommonSwingH(const uint8_t pos);
stdAc::state_t toCommon(void) const;
String toString(void) const;
#ifndef UNIT_TEST
private:
IRsend _irsend;
#else // UNIT_TEST
IRsendTest _irsend;
#endif // UNIT_TEST
Mitsubishi152Protocol _;
void checksum(void);
};
class IRMitsubishiHeavy88Ac {
public:
explicit IRMitsubishiHeavy88Ac(const uint16_t pin,
const bool inverted = false,
const bool use_modulation = true);
void stateReset(void);
#if SEND_MITSUBISHIHEAVY
void send(const uint16_t repeat = kMitsubishiHeavy88MinRepeat);
int8_t calibrate(void) { return _irsend.calibrate(); }
#endif // SEND_MITSUBISHIHEAVY
void begin(void);
void on(void);
void off(void);
void setPower(const bool on);
bool getPower(void) const;
void setTemp(const uint8_t temp);
uint8_t getTemp(void) const;
void setFan(const uint8_t fan);
uint8_t getFan(void) const;
void setMode(const uint8_t mode);
uint8_t getMode(void) const;
void setSwingVertical(const uint8_t pos);
uint8_t getSwingVertical(void) const;
void setSwingHorizontal(const uint8_t pos);
uint8_t getSwingHorizontal(void) const;
void setTurbo(const bool on);
bool getTurbo(void) const;
void setEcono(const bool on);
bool getEcono(void) const;
void set3D(const bool on);
bool get3D(void) const;
void setClean(const bool on);
bool getClean(void) const;
uint8_t* getRaw(void);
void setRaw(const uint8_t* data);
static bool checkZjsSig(const uint8_t *state);
static bool validChecksum(
const uint8_t *state,
const uint16_t length = kMitsubishiHeavy88StateLength);
static uint8_t convertMode(const stdAc::opmode_t mode);
static uint8_t convertFan(const stdAc::fanspeed_t speed);
static uint8_t convertSwingV(const stdAc::swingv_t position);
static uint8_t convertSwingH(const stdAc::swingh_t position);
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
static stdAc::swingv_t toCommonSwingV(const uint8_t pos);
static stdAc::swingh_t toCommonSwingH(const uint8_t pos);
stdAc::state_t toCommon(void) const;
String toString(void) const;
#ifndef UNIT_TEST
private:
IRsend _irsend;
#else // UNIT_TEST
IRsendTest _irsend;
#endif // UNIT_TEST
Mitsubishi88Protocol _;
void checksum(void);
};
#endif // IR_MITSUBISHIHEAVY_H_
IRMitsubishiHeavy88Ac::getClean
bool getClean(void) const
Get the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:812
IRMitsubishiHeavy88Ac::setFan
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_MitsubishiHeavy.cpp:671
IRMitsubishiHeavy88Ac::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_MitsubishiHeavy.cpp:686
IRMitsubishiHeavy88Ac::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_MitsubishiHeavy.cpp:640
kMitsubishiHeavy88SwingVByte5Size
const uint8_t kMitsubishiHeavy88SwingVByte5Size
Definition: ir_MitsubishiHeavy.h:169
Mitsubishi88Protocol::Fan
uint8_t Fan
Definition: ir_MitsubishiHeavy.h:137
kMitsubishiHeavy152StateLength
const uint16_t kMitsubishiHeavy152StateLength
Definition: IRremoteESP8266.h:1016
IRMitsubishiHeavy152Ac::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_MitsubishiHeavy.h:196
IRMitsubishiHeavy152Ac
Class for handling detailed Mitsubishi Heavy 152-bit A/C messages.
Definition: ir_MitsubishiHeavy.h:184
IRMitsubishiHeavy88Ac::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_MitsubishiHeavy.cpp:617
IRMitsubishiHeavy152Ac::checksum
void checksum(void)
Calculate the checksum for the current internal state of the remote. Note: Technically it has no chec...
Definition: ir_MitsubishiHeavy.cpp:319
kMitsubishiHeavy152SwingVHigh
const uint8_t kMitsubishiHeavy152SwingVHigh
Definition: ir_MitsubishiHeavy.h:103
Mitsubishi152Protocol::Mode
uint8_t Mode
Definition: ir_MitsubishiHeavy.h:39
IRMitsubishiHeavy152Ac::toString
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_MitsubishiHeavy.cpp:480
Mitsubishi152Protocol::Filter
uint8_t Filter
Definition: ir_MitsubishiHeavy.h:43
IRMitsubishiHeavy152Ac::convertSwingH
static uint8_t convertSwingH(const stdAc::swingh_t position)
Convert a stdAc::swingh_t enum into it's native setting.
Definition: ir_MitsubishiHeavy.cpp:383
kMitsubishiHeavy152SwingHRightLeft
const uint8_t kMitsubishiHeavy152SwingHRightLeft
Definition: ir_MitsubishiHeavy.h:115
IRMitsubishiHeavy152Ac::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_MitsubishiHeavy.cpp:340
Mitsubishi152Protocol::D
uint8_t D
Definition: ir_MitsubishiHeavy.h:61
IRMitsubishiHeavy152Ac::getNight
bool getNight(void) const
Get the Night (Sleep) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:224
IRMitsubishiHeavy88Ac::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_MitsubishiHeavy.cpp:897
IRMitsubishiHeavy88Ac::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_MitsubishiHeavy.cpp:650
IRMitsubishiHeavy152Ac::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_MitsubishiHeavy.cpp:123
IRMitsubishiHeavy88Ac::set3D
void set3D(const bool on)
Set the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:791
stdAc::swingv_t
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:70
kMitsubishiHeavy152FanMed
const uint8_t kMitsubishiHeavy152FanMed
Definition: ir_MitsubishiHeavy.h:95
IRMitsubishiHeavy88Ac::setSwingHorizontal
void setSwingHorizontal(const uint8_t pos)
Set the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:737
IRMitsubishiHeavy152Ac::getTemp
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_MitsubishiHeavy.cpp:144
Mitsubishi88Protocol::Clean
uint8_t Clean
Definition: ir_MitsubishiHeavy.h:130
IRMitsubishiHeavy152Ac::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_MitsubishiHeavy.h:260
kMitsubishiHeavy152FanAuto
const uint8_t kMitsubishiHeavy152FanAuto
Definition: ir_MitsubishiHeavy.h:93
IRMitsubishiHeavy152Ac::IRMitsubishiHeavy152Ac
IRMitsubishiHeavy152Ac(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_MitsubishiHeavy.cpp:77
stdAc::fanspeed_t
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
Mitsubishi152Protocol::SwingH
uint8_t SwingH
Definition: ir_MitsubishiHeavy.h:66
kMitsubishiHeavy152SwingVAuto
const uint8_t kMitsubishiHeavy152SwingVAuto
Definition: ir_MitsubishiHeavy.h:101
IRMitsubishiHeavy88Ac::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:692
kMitsubishiHeavy88FanTurbo
const uint8_t kMitsubishiHeavy88FanTurbo
Definition: ir_MitsubishiHeavy.h:167
IRMitsubishiHeavy88Ac::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_MitsubishiHeavy.cpp:852
Mitsubishi152Protocol::Silent
uint8_t Silent
Definition: ir_MitsubishiHeavy.h:73
kMitsubishiHeavy88SwingHLeftMax
const uint8_t kMitsubishiHeavy88SwingHLeftMax
Definition: ir_MitsubishiHeavy.h:154
kMitsubishiHeavy152SwingVHighest
const uint8_t kMitsubishiHeavy152SwingVHighest
Definition: ir_MitsubishiHeavy.h:102
kMitsubishiHeavy88SwingH3D
const uint8_t kMitsubishiHeavy88SwingH3D
Definition: ir_MitsubishiHeavy.h:161
kMitsubishiHeavy88SwingHLeft
const uint8_t kMitsubishiHeavy88SwingHLeft
Definition: ir_MitsubishiHeavy.h:155
IRMitsubishiHeavy88Ac::_
Mitsubishi88Protocol _
Definition: ir_MitsubishiHeavy.h:343
kMitsubishiHeavy152SwingVLow
const uint8_t kMitsubishiHeavy152SwingVLow
Definition: ir_MitsubishiHeavy.h:105
kMitsubishiHeavy152SwingHOff
const uint8_t kMitsubishiHeavy152SwingHOff
Definition: ir_MitsubishiHeavy.h:117
IRMitsubishiHeavy152Ac::getSwingHorizontal
uint8_t getSwingHorizontal(void) const
Get the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:212
IRMitsubishiHeavy152Ac::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_MitsubishiHeavy.cpp:95
IRsend.h
kMitsubishiHeavy152SwingHLeftRight
const uint8_t kMitsubishiHeavy152SwingHLeftRight
Definition: ir_MitsubishiHeavy.h:116
IRMitsubishiHeavy88Ac::checksum
void checksum(void)
Calculate the checksum for the current internal state of the remote. Note: Technically it has no chec...
Definition: ir_MitsubishiHeavy.cpp:827
kMitsubishiHeavy88SwingHMiddle
const uint8_t kMitsubishiHeavy88SwingHMiddle
Definition: ir_MitsubishiHeavy.h:156
IRMitsubishiHeavy152Ac::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_MitsubishiHeavy.cpp:411
IRMitsubishiHeavy88Ac::on
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_MitsubishiHeavy.cpp:637
Mitsubishi152Protocol::Sig
uint8_t Sig[5]
Definition: ir_MitsubishiHeavy.h:37
kMitsubishiHeavy88SwingVAuto
const uint8_t kMitsubishiHeavy88SwingVAuto
Definition: ir_MitsubishiHeavy.h:173
IRMitsubishiHeavy152Ac::getClean
bool getClean(void) const
Get the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:276
IRMitsubishiHeavy88Ac::setClean
void setClean(const bool on)
Set the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:806
IRMitsubishiHeavy152Ac::setSilent
void setSilent(const bool on)
Set the Silent (Quiet) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:245
IRMitsubishiHeavy152Ac::getTurbo
bool getTurbo(void) const
Get the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:290
IRMitsubishiHeavy88Ac::getTurbo
bool getTurbo(void) const
Get the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:771
IRsend
Class for sending all basic IR protocols.
Definition: IRsend.h:182
kMitsubishiHeavy88FanEcono
const uint8_t kMitsubishiHeavy88FanEcono
Definition: ir_MitsubishiHeavy.h:168
IRMitsubishiHeavy88Ac::setSwingVertical
void setSwingVertical(const uint8_t pos)
Set the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:714
IRsend::calibrate
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
kMitsubishiHeavy88SwingHSize
const uint8_t kMitsubishiHeavy88SwingHSize
Definition: ir_MitsubishiHeavy.h:151
IRMitsubishiHeavy152Ac::setClean
void setClean(const bool on)
Set the Clean mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:269
IRMitsubishiHeavy152Ac::setTemp
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_MitsubishiHeavy.cpp:135
IRMitsubishiHeavy152Ac::on
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_MitsubishiHeavy.cpp:116
String
std::string String
Definition: IRremoteESP8266.h:1178
IRMitsubishiHeavy152Ac::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_MitsubishiHeavy.cpp:83
IRMitsubishiHeavy88Ac::convertSwingV
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_MitsubishiHeavy.cpp:867
IRMitsubishiHeavy152Ac::setNight
void setNight(const bool on)
Set the Night (Sleep) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:218
Mitsubishi152Protocol::Night
uint8_t Night
Definition: ir_MitsubishiHeavy.h:72
IRMitsubishiHeavy88Ac::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_MitsubishiHeavy.h:337
kMitsubishiHeavySigLength
const uint8_t kMitsubishiHeavySigLength
Definition: ir_MitsubishiHeavy.h:78
Mitsubishi88Protocol::SwingV5
uint8_t SwingV5
Definition: ir_MitsubishiHeavy.h:127
IRMitsubishiHeavy152Ac::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_MitsubishiHeavy.cpp:119
IRMitsubishiHeavy152Ac::setSwingVertical
void setSwingVertical(const uint8_t pos)
Set the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:194
kMitsubishiHeavy88SwingHRightLeft
const uint8_t kMitsubishiHeavy88SwingHRightLeft
Definition: ir_MitsubishiHeavy.h:159
kMitsubishiHeavy152SwingHRight
const uint8_t kMitsubishiHeavy152SwingHRight
Definition: ir_MitsubishiHeavy.h:113
kMitsubishiHeavyHeat
const uint8_t kMitsubishiHeavyHeat
Definition: ir_MitsubishiHeavy.h:88
IRMitsubishiHeavy88Ac::setTurbo
void setTurbo(const bool on)
Set the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:763
IRremoteESP8266.h
stdAc::swingh_t
swingh_t
Common A/C settings for Horizontal Swing.
Definition: IRsend.h:83
kMitsubishiHeavy152SwingHLeftMax
const uint8_t kMitsubishiHeavy152SwingHLeftMax
Definition: ir_MitsubishiHeavy.h:110
Mitsubishi88Protocol::SwingH1
uint8_t SwingH1
Definition: ir_MitsubishiHeavy.h:128
kMitsubishiHeavyZmsSig
const uint8_t kMitsubishiHeavyZmsSig[kMitsubishiHeavySigLength]
Definition: ir_MitsubishiHeavy.h:81
IRMitsubishiHeavy152Ac::getEcono
bool getEcono(void) const
Get the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:304
IRMitsubishiHeavy152Ac::get3D
bool get3D(void) const
Get the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:239
kMitsubishiHeavy152MinRepeat
const uint16_t kMitsubishiHeavy152MinRepeat
Definition: IRremoteESP8266.h:1018
IRMitsubishiHeavy88Ac::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_MitsubishiHeavy.h:283
IRMitsubishiHeavy152Ac::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_MitsubishiHeavy.cpp:166
Mitsubishi152Protocol::Temp
uint8_t Temp
Definition: ir_MitsubishiHeavy.h:48
IRMitsubishiHeavy88Ac::checkZjsSig
static bool checkZjsSig(const uint8_t *state)
Verify the given state has a ZJ-S signature.
Definition: ir_MitsubishiHeavy.cpp:819
IRMitsubishiHeavy88Ac::setTemp
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_MitsubishiHeavy.cpp:656
IRMitsubishiHeavy152Ac::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_MitsubishiHeavy.cpp:129
IRMitsubishiHeavy88Ac::IRMitsubishiHeavy88Ac
IRMitsubishiHeavy88Ac(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_MitsubishiHeavy.cpp:599
Mitsubishi88Protocol::Sig
uint8_t Sig[5]
Definition: ir_MitsubishiHeavy.h:124
kMitsubishiHeavyMaxTemp
const uint8_t kMitsubishiHeavyMaxTemp
Definition: ir_MitsubishiHeavy.h:91
IRMitsubishiHeavy88Ac::setRaw
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:632
kMitsubishiHeavy88StateLength
const uint16_t kMitsubishiHeavy88StateLength
Definition: IRremoteESP8266.h:1013
kMitsubishiHeavy88SwingVMiddle
const uint8_t kMitsubishiHeavy88SwingVMiddle
Definition: ir_MitsubishiHeavy.h:176
IRMitsubishiHeavy152Ac::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_MitsubishiHeavy.cpp:353
kMitsubishiHeavyZjsSig
const uint8_t kMitsubishiHeavyZjsSig[kMitsubishiHeavySigLength]
Definition: ir_MitsubishiHeavy.h:148
kMitsubishiHeavy152FanLow
const uint8_t kMitsubishiHeavy152FanLow
Definition: ir_MitsubishiHeavy.h:94
kMitsubishiHeavy88FanHigh
const uint8_t kMitsubishiHeavy88FanHigh
Definition: ir_MitsubishiHeavy.h:166
IRMitsubishiHeavy152Ac::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_MitsubishiHeavy.cpp:398
Mitsubishi152Protocol::Three
uint8_t Three
Definition: ir_MitsubishiHeavy.h:59
IRMitsubishiHeavy152Ac::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:104
kMitsubishiHeavyMinTemp
const uint8_t kMitsubishiHeavyMinTemp
Definition: ir_MitsubishiHeavy.h:90
Mitsubishi152Protocol::Power
uint8_t Power
Definition: ir_MitsubishiHeavy.h:40
kMitsubishiHeavyCool
const uint8_t kMitsubishiHeavyCool
Definition: ir_MitsubishiHeavy.h:85
IRMitsubishiHeavy152Ac::setEcono
void setEcono(const bool on)
Set the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:296
IRMitsubishiHeavy88Ac::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:625
kMitsubishiHeavy88FanLow
const uint8_t kMitsubishiHeavy88FanLow
Definition: ir_MitsubishiHeavy.h:164
IRMitsubishiHeavy88Ac::getTemp
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_MitsubishiHeavy.cpp:665
Mitsubishi88Protocol::raw
uint8_t raw[kMitsubishiHeavy88StateLength]
State in code form.
Definition: ir_MitsubishiHeavy.h:121
kMitsubishiHeavy88SwingVLow
const uint8_t kMitsubishiHeavy88SwingVLow
Definition: ir_MitsubishiHeavy.h:177
IRMitsubishiHeavy152Ac::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_MitsubishiHeavy.cpp:188
IRMitsubishiHeavy88Ac::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_MitsubishiHeavy.cpp:708
IRMitsubishiHeavy152Ac::checkZmsSig
static bool checkZmsSig(const uint8_t *state)
Verify the given state has a ZM-S signature.
Definition: ir_MitsubishiHeavy.cpp:311
kMitsubishiHeavy152SwingVMiddle
const uint8_t kMitsubishiHeavy152SwingVMiddle
Definition: ir_MitsubishiHeavy.h:104
kMitsubishiHeavy88SwingHRight
const uint8_t kMitsubishiHeavy88SwingHRight
Definition: ir_MitsubishiHeavy.h:157
kMitsubishiHeavy88SwingVHighest
const uint8_t kMitsubishiHeavy88SwingVHighest
Definition: ir_MitsubishiHeavy.h:174
Mitsubishi88Protocol::Mode
uint8_t Mode
Definition: ir_MitsubishiHeavy.h:141
IRMitsubishiHeavy88Ac::getSwingHorizontal
uint8_t getSwingHorizontal(void) const
Get the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:757
kMitsubishiHeavy88SwingVOff
const uint8_t kMitsubishiHeavy88SwingVOff
Definition: ir_MitsubishiHeavy.h:172
IRMitsubishiHeavy152Ac::getSwingVertical
uint8_t getSwingVertical(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:200
IRMitsubishiHeavy88Ac::setEcono
void setEcono(const bool on)
Set the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:777
Mitsubishi88Protocol::SwingV7
uint8_t SwingV7
Definition: ir_MitsubishiHeavy.h:136
kMitsubishiHeavy88SwingVLowest
const uint8_t kMitsubishiHeavy88SwingVLowest
Definition: ir_MitsubishiHeavy.h:178
kMitsubishiHeavy152SwingHAuto
const uint8_t kMitsubishiHeavy152SwingHAuto
Definition: ir_MitsubishiHeavy.h:109
kMitsubishiHeavy152SwingHLeft
const uint8_t kMitsubishiHeavy152SwingHLeft
Definition: ir_MitsubishiHeavy.h:111
IRMitsubishiHeavy152Ac::_
Mitsubishi152Protocol _
Definition: ir_MitsubishiHeavy.h:266
IRMitsubishiHeavy152Ac::setFan
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_MitsubishiHeavy.cpp:150
Mitsubishi152Protocol::raw
uint8_t raw[kMitsubishiHeavy152StateLength]
State in code form.
Definition: ir_MitsubishiHeavy.h:34
Mitsubishi152Protocol::Fan
uint8_t Fan
Definition: ir_MitsubishiHeavy.h:53
IRMitsubishiHeavy88Ac::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_MitsubishiHeavy.cpp:845
kMitsubishiHeavy88SwingHAuto
const uint8_t kMitsubishiHeavy88SwingHAuto
Definition: ir_MitsubishiHeavy.h:153
kMitsubishiHeavyFan
const uint8_t kMitsubishiHeavyFan
Definition: ir_MitsubishiHeavy.h:87
IRMitsubishiHeavy152Ac::getFilter
bool getFilter(void) const
Get the Filter mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:263
kMitsubishiHeavy88MinRepeat
const uint16_t kMitsubishiHeavy88MinRepeat
Definition: IRremoteESP8266.h:1015
kMitsubishiHeavy88SwingHOff
const uint8_t kMitsubishiHeavy88SwingHOff
Definition: ir_MitsubishiHeavy.h:152
IRMitsubishiHeavy152Ac::setSwingHorizontal
void setSwingHorizontal(const uint8_t pos)
Set the Horizontal Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:206
Mitsubishi88Protocol::SwingH2
uint8_t SwingH2
Definition: ir_MitsubishiHeavy.h:131
IRMitsubishiHeavy152Ac::validChecksum
static bool validChecksum(const uint8_t *state, const uint16_t length=kMitsubishiHeavy152StateLength)
Verify the checksum is valid for a given state.
Definition: ir_MitsubishiHeavy.cpp:329
kMitsubishiHeavy152SwingVOff
const uint8_t kMitsubishiHeavy152SwingVOff
Definition: ir_MitsubishiHeavy.h:107
IRMitsubishiHeavy88Ac::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_MitsubishiHeavy.cpp:940
kMitsubishiHeavy152SwingVLowest
const uint8_t kMitsubishiHeavy152SwingVLowest
Definition: ir_MitsubishiHeavy.h:106
Mitsubishi88Protocol
Native representation of a Mitsubishi Heavy 88-bit A/C message.
Definition: ir_MitsubishiHeavy.h:120
IRMitsubishiHeavy152Ac::setRaw
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_MitsubishiHeavy.cpp:111
kMitsubishiHeavy88SwingHLeftRight
const uint8_t kMitsubishiHeavy88SwingHLeftRight
Definition: ir_MitsubishiHeavy.h:160
kMitsubishiHeavy88FanAuto
const uint8_t kMitsubishiHeavy88FanAuto
Definition: ir_MitsubishiHeavy.h:163
IRMitsubishiHeavy152Ac::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:172
IRMitsubishiHeavy152Ac::toCommonSwingH
static stdAc::swingh_t toCommonSwingH(const uint8_t pos)
Convert a native horizontal swing postion to it's common equivalent.
Definition: ir_MitsubishiHeavy.cpp:425
IRMitsubishiHeavy88Ac::get3D
bool get3D(void) const
Get the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:800
Mitsubishi88Protocol::Power
uint8_t Power
Definition: ir_MitsubishiHeavy.h:142
kMitsubishiHeavy88FanMed
const uint8_t kMitsubishiHeavy88FanMed
Definition: ir_MitsubishiHeavy.h:165
IRMitsubishiHeavy152Ac::setTurbo
void setTurbo(const bool on)
Set the Turbo mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:282
kMitsubishiHeavy88SwingHRightMax
const uint8_t kMitsubishiHeavy88SwingHRightMax
Definition: ir_MitsubishiHeavy.h:158
IRMitsubishiHeavy152Ac::getSilent
bool getSilent(void) const
Get the Silent (Quiet) mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:251
IRMitsubishiHeavy88Ac::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_MitsubishiHeavy.cpp:644
Mitsubishi152Protocol::Clean
uint8_t Clean
Definition: ir_MitsubishiHeavy.h:42
kMitsubishiHeavy152FanHigh
const uint8_t kMitsubishiHeavy152FanHigh
Definition: ir_MitsubishiHeavy.h:96
IRMitsubishiHeavy152Ac::setFilter
void setFilter(const bool on)
Set the Filter mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:257
IRMitsubishiHeavy88Ac::validChecksum
static bool validChecksum(const uint8_t *state, const uint16_t length=kMitsubishiHeavy88StateLength)
Verify the checksum is valid for a given state.
Definition: ir_MitsubishiHeavy.cpp:837
IRMitsubishiHeavy88Ac::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_MitsubishiHeavy.cpp:605
kMitsubishiHeavy152SwingHRightMax
const uint8_t kMitsubishiHeavy152SwingHRightMax
Definition: ir_MitsubishiHeavy.h:114
IRMitsubishiHeavy152Ac::set3D
void set3D(const bool on)
Set the 3D mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:230
kMitsubishiHeavy152SwingHMiddle
const uint8_t kMitsubishiHeavy152SwingHMiddle
Definition: ir_MitsubishiHeavy.h:112
IRMitsubishiHeavy152Ac::convertSwingV
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_MitsubishiHeavy.cpp:368
IRMitsubishiHeavy88Ac
Class for handling detailed Mitsubishi Heavy 88-bit A/C messages.
Definition: ir_MitsubishiHeavy.h:271
IRMitsubishiHeavy88Ac::getSwingVertical
uint8_t getSwingVertical(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:731
IRMitsubishiHeavy88Ac::toString
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_MitsubishiHeavy.cpp:966
kMitsubishiHeavy152FanTurbo
const uint8_t kMitsubishiHeavy152FanTurbo
Definition: ir_MitsubishiHeavy.h:99
IRMitsubishiHeavy152Ac::toCommonSwingV
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_MitsubishiHeavy.cpp:440
IRMitsubishiHeavy152Ac::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_MitsubishiHeavy.cpp:454
IRMitsubishiHeavy88Ac::convertSwingH
static uint8_t convertSwingH(const stdAc::swingh_t position)
Convert a stdAc::swingh_t enum into it's native setting.
Definition: ir_MitsubishiHeavy.cpp:882
kMitsubishiHeavyDry
const uint8_t kMitsubishiHeavyDry
Definition: ir_MitsubishiHeavy.h:86
IRMitsubishiHeavy88Ac::toCommonSwingH
static stdAc::swingh_t toCommonSwingH(const uint8_t pos)
Convert a native horizontal swing postion to it's common equivalent.
Definition: ir_MitsubishiHeavy.cpp:911
stdAc::state_t
Structure to hold a common A/C state.
Definition: IRsend.h:97
Mitsubishi152Protocol
Native representation of a Mitsubishi Heavy 152-bit A/C message.
Definition: ir_MitsubishiHeavy.h:33
IRMitsubishiHeavy88Ac::getEcono
bool getEcono(void) const
Get the Economical mode of the A/C.
Definition: ir_MitsubishiHeavy.cpp:785
Mitsubishi88Protocol::Temp
uint8_t Temp
Definition: ir_MitsubishiHeavy.h:143
kMitsubishiHeavy88SwingVHigh
const uint8_t kMitsubishiHeavy88SwingVHigh
Definition: ir_MitsubishiHeavy.h:175
IRMitsubishiHeavy88Ac::toCommonSwingV
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_MitsubishiHeavy.cpp:926
IRMitsubishiHeavy88Ac::send
void send(const uint16_t repeat=kMitsubishiHeavy88MinRepeat)
Send the current internal state as an IR message.
Definition: ir_MitsubishiHeavy.cpp:610
IRMitsubishiHeavy152Ac::send
void send(const uint16_t repeat=kMitsubishiHeavy152MinRepeat)
Send the current internal state as an IR message.
Definition: ir_MitsubishiHeavy.cpp:88
kMitsubishiHeavyAuto
const uint8_t kMitsubishiHeavyAuto
Definition: ir_MitsubishiHeavy.h:84
kMitsubishiHeavy152FanEcono
const uint8_t kMitsubishiHeavy152FanEcono
Definition: ir_MitsubishiHeavy.h:98
Mitsubishi152Protocol::SwingV
uint8_t SwingV
Definition: ir_MitsubishiHeavy.h:62
kMitsubishiHeavy152FanMax
const uint8_t kMitsubishiHeavy152FanMax
Definition: ir_MitsubishiHeavy.h:97
stdAc::opmode_t
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46