# IRremoteESP8266: src/ir_Mitsubishi.h Source File

ir_Mitsubishi.h
Go to the documentation of this file.
// Copyright 2009 Ken Shirriff
// Copyright 2017-2019 David Conran
// Copyright 2019 Mark Kuchel
// Supports:
// Brand: Mitsubishi, Model: TV (MITSUBISHI)
// Brand: Mitsubishi, Model: HC3000 Projector (MITSUBISHI2)
// Brand: Mitsubishi, Model: MS-GK24VA A/C
// Brand: Mitsubishi, Model: KM14A 0179213 remote
// Brand: Mitsubishi Electric, Model: PEAD-RP71JAA Ducted A/C (MITSUBISHI136)
// Brand: Mitsubishi Electric, Model: 001CP T7WE10714 remote (MITSUBISHI136)
// Brand: Mitsubishi Electric, Model: MSH-A24WV A/C (MITSUBISHI112)
// Brand: Mitsubishi Electric, Model: MUH-A24WV A/C (MITSUBISHI112)
// Brand: Mitsubishi Electric, Model: KPOA remote (MITSUBISHI112)
#ifndef IR_MITSUBISHI_H_
#define IR_MITSUBISHI_H_
#define __STDC_LIMIT_MACROS
#include <stdint.h>
#ifndef UNIT_TEST
#include <Arduino.h>
#endif
#include "IRremoteESP8266.h"
#include "IRsend.h"
#ifdef UNIT_TEST
#include "IRsend_test.h"
#endif
union Mitsubishi144Protocol{
uint8_t raw[kMitsubishiACStateLength];
struct {
// Byte 0~4
uint8_t pad0[5];
// Byte 5
uint8_t :5;
uint8_t Power :1;
uint8_t :2;
// Byte 6
uint8_t :3;
uint8_t Mode :3;
uint8_t :2;
// Byte 7
uint8_t Temp :8;
// Byte 8
uint8_t :4;
uint8_t WideVane:4; // SwingH
// Byte 9
uint8_t Fan :3;
uint8_t Vane :3; // SwingV
uint8_t VaneBit :1;
uint8_t FanAuto :1;
// Byte 10
uint8_t Clock :8;
// Byte 11
uint8_t StopClock :8;
// Byte 12
uint8_t StartClock:8;
// Byte 13
uint8_t Timer :3;
uint8_t :5;
// Byte 14~16
uint8_t pad1[3];
// Byte 17
uint8_t Sum :8;
};
};
// Constants
const uint8_t kMitsubishiAcAuto = 0b100;
const uint8_t kMitsubishiAcCool = 0b011;
const uint8_t kMitsubishiAcDry = 0b010;
const uint8_t kMitsubishiAcHeat = 0b001;
const uint8_t kMitsubishiAcFanAuto = 0;
const uint8_t kMitsubishiAcFanMax = 5;
const uint8_t kMitsubishiAcFanRealMax = 4;
const uint8_t kMitsubishiAcFanSilent = 6;
const uint8_t kMitsubishiAcFanQuiet = kMitsubishiAcFanSilent;
const uint8_t kMitsubishiAcMinTemp = 16; // 16C
const uint8_t kMitsubishiAcMaxTemp = 31; // 31C
const uint8_t kMitsubishiAcVaneAuto = 0;
const uint8_t kMitsubishiAcVaneAutoMove = 7;
const uint8_t kMitsubishiAcNoTimer = 0;
const uint8_t kMitsubishiAcStartTimer = 5;
const uint8_t kMitsubishiAcStopTimer = 3;
const uint8_t kMitsubishiAcStartStopTimer = 7;
const uint8_t kMitsubishiAcWideVaneAuto = 8;
union Mitsubishi136Protocol{
uint8_t raw[kMitsubishi136StateLength];
struct {
// Byte 0~4
uint8_t pad[5];
// Byte 5
uint8_t :6;
uint8_t Power :1;
uint8_t :1;
// Byte 6
uint8_t Mode :3;
uint8_t :1;
uint8_t Temp :4;
// Byte 7
uint8_t :1;
uint8_t Fan :2;
uint8_t :1;
uint8_t SwingV :4;
};
};
const uint8_t kMitsubishi136PowerByte = 5;
const uint8_t kMitsubishi136MinTemp = 17; // 17C
const uint8_t kMitsubishi136MaxTemp = 30; // 30C
const uint8_t kMitsubishi136Fan = 0b000;
const uint8_t kMitsubishi136Cool = 0b001;
const uint8_t kMitsubishi136Heat = 0b010;
const uint8_t kMitsubishi136Auto = 0b011;
const uint8_t kMitsubishi136Dry = 0b101;
const uint8_t kMitsubishi136SwingVLowest = 0b0000;
const uint8_t kMitsubishi136SwingVLow = 0b0001;
const uint8_t kMitsubishi136SwingVHigh = 0b0010;
const uint8_t kMitsubishi136SwingVHighest = 0b0011;
const uint8_t kMitsubishi136SwingVAuto = 0b1100;
const uint8_t kMitsubishi136FanMin = 0b00;
const uint8_t kMitsubishi136FanLow = 0b01;
const uint8_t kMitsubishi136FanMed = 0b10;
const uint8_t kMitsubishi136FanMax = 0b11;
const uint8_t kMitsubishi136FanQuiet = kMitsubishi136FanMin;
union Mitsubishi112Protocol{
uint8_t raw[kMitsubishi112StateLength];
struct {
// Byte 0~4
uint8_t pad0[5];
// Byte 5
uint8_t :2;
uint8_t Power :1;
uint8_t :5;
// Byte 6
uint8_t Mode :3;
uint8_t :5;
// Byte 7
uint8_t Temp :4;
uint8_t :4;
// Byte 8
uint8_t Fan :3;
uint8_t SwingV :3;
uint8_t :2;
// Byte 9~11
uint8_t pad1[3];
// Byte 12
uint8_t :2;
uint8_t SwingH :4;
uint8_t :2;
// Byte 13
uint8_t Sum :8;
};
};
const uint8_t kMitsubishi112Cool = 0b011;
const uint8_t kMitsubishi112Heat = 0b001;
const uint8_t kMitsubishi112Auto = 0b111;
const uint8_t kMitsubishi112Dry = 0b010;
const uint8_t kMitsubishi112MinTemp = 16; // 16C
const uint8_t kMitsubishi112MaxTemp = 31; // 31C
const uint8_t kMitsubishi112FanMin = 0b010;
const uint8_t kMitsubishi112FanLow = 0b011;
const uint8_t kMitsubishi112FanMed = 0b101;
const uint8_t kMitsubishi112FanMax = 0b000;
const uint8_t kMitsubishi112FanQuiet = kMitsubishi112FanMin;
const uint8_t kMitsubishi112SwingVLowest = 0b101;
const uint8_t kMitsubishi112SwingVLow = 0b100;
const uint8_t kMitsubishi112SwingVMiddle = 0b011;
const uint8_t kMitsubishi112SwingVHigh = 0b010;
const uint8_t kMitsubishi112SwingVHighest = 0b001;
const uint8_t kMitsubishi112SwingVAuto = 0b111;
const uint8_t kMitsubishi112SwingHLeftMax = 0b0001;
const uint8_t kMitsubishi112SwingHLeft = 0b0010;
const uint8_t kMitsubishi112SwingHMiddle = 0b0011;
const uint8_t kMitsubishi112SwingHRight = 0b0100;
const uint8_t kMitsubishi112SwingHRightMax = 0b0101;
const uint8_t kMitsubishi112SwingHWide = 0b1000;
const uint8_t kMitsubishi112SwingHAuto = 0b1100;
// Legacy defines (Deprecated)
#define MITSUBISHI_AC_VANE_AUTO_MOVE kMitsubishiAcVaneAutoMove
#define MITSUBISHI_AC_VANE_AUTO kMitsubishiAcVaneAuto
#define MITSUBISHI_AC_MIN_TEMP kMitsubishiAcMinTemp
#define MITSUBISHI_AC_MAX_TEMP kMitsubishiAcMaxTemp
#define MITSUBISHI_AC_HEAT kMitsubishiAcHeat
#define MITSUBISHI_AC_FAN_SILENT kMitsubishiAcFanSilent
#define MITSUBISHI_AC_FAN_REAL_MAX kMitsubishiAcFanRealMax
#define MITSUBISHI_AC_FAN_MAX kMitsubishiAcFanMax
#define MITSUBISHI_AC_FAN_AUTO kMitsubishiAcFanAuto
#define MITSUBISHI_AC_DRY kMitsubishiAcDry
#define MITSUBISHI_AC_COOL kMitsubishiAcCool
#define MITSUBISHI_AC_AUTO kMitsubishiAcAuto
class IRMitsubishiAC {
public:
explicit IRMitsubishiAC(const uint16_t pin, const bool inverted = false,
const bool use_modulation = true);
void stateReset(void);
static bool validChecksum(const uint8_t* data);
#if SEND_MITSUBISHI_AC
void send(const uint16_t repeat = kMitsubishiACMinRepeat);
int8_t calibrate(void) { return _irsend.calibrate(); }
#endif // SEND_MITSUBISHI_AC
void begin(void);
void on(void);
void off(void);
void setPower(const bool on);
bool getPower(void) const;
void setTemp(const uint8_t degrees);
uint8_t getTemp(void) const;
void setFan(const uint8_t speed);
uint8_t getFan(void) const;
void setMode(const uint8_t mode);
uint8_t getMode(void) const;
void setVane(const uint8_t position);
void setWideVane(const uint8_t position);
uint8_t getVane(void) const;
uint8_t getWideVane(void) const;
uint8_t* getRaw(void);
void setRaw(const uint8_t* data);
uint8_t getClock(void) const;
void setClock(const uint8_t clock);
uint8_t getStartClock(void) const;
void setStartClock(const uint8_t clock);
uint8_t getStopClock(void) const;
void setStopClock(const uint8_t clock);
uint8_t getTimer(void) const;
void setTimer(const uint8_t timer);
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
Mitsubishi144Protocol _;
void checksum(void);
static uint8_t calculateChecksum(const uint8_t* data);
};
class IRMitsubishi136 {
public:
explicit IRMitsubishi136(const uint16_t pin, const bool inverted = false,
const bool use_modulation = true);
void stateReset(void);
#if SEND_MITSUBISHI136
void send(const uint16_t repeat = kMitsubishi136MinRepeat);
int8_t calibrate(void) { return _irsend.calibrate(); }
#endif // SEND_MITSUBISHI136
void begin(void);
static bool validChecksum(const uint8_t* data,
const uint16_t len = kMitsubishi136StateLength);
void on(void);
void off(void);
void setPower(const bool on);
bool getPower(void) const;
void setTemp(const uint8_t degrees);
uint8_t getTemp(void) const;
void setFan(const uint8_t speed);
uint8_t getFan(void) const;
void setMode(const uint8_t mode);
uint8_t getMode(void) const;
void setSwingV(const uint8_t position);
uint8_t getSwingV(void) const;
void setQuiet(const bool on);
bool getQuiet(void) const;
uint8_t* getRaw(void);
void setRaw(const uint8_t* data);
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 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);
stdAc::state_t toCommon(void) const;
String toString(void) const;
#ifndef UNIT_TEST
private:
IRsend _irsend;
#else // UNIT_TEST
IRsendTest _irsend;
#endif // UNIT_TEST
Mitsubishi136Protocol _;
void checksum(void);
};
class IRMitsubishi112 {
public:
explicit IRMitsubishi112(const uint16_t pin, const bool inverted = false,
const bool use_modulation = true);
void stateReset(void);
#if SEND_MITSUBISHI112
void send(const uint16_t repeat = kMitsubishi112MinRepeat);
int8_t calibrate(void) { return _irsend.calibrate(); }
#endif // SEND_MITSUBISHI112
void begin(void);
void on(void);
void off(void);
void setPower(const bool on);
bool getPower(void) const;
void setTemp(const uint8_t degrees);
uint8_t getTemp(void) const;
void setFan(const uint8_t speed);
uint8_t getFan(void) const;
void setMode(const uint8_t mode);
uint8_t getMode(void) const;
void setSwingV(const uint8_t position);
uint8_t getSwingV(void) const;
void setSwingH(const uint8_t position);
uint8_t getSwingH(void) const;
void setQuiet(const bool on);
bool getQuiet(void) const;
uint8_t* getRaw(void);
void setRaw(const uint8_t* data);
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
Mitsubishi112Protocol _;
void checksum(void);
};
#endif // IR_MITSUBISHI_H_
kMitsubishi112SwingVMiddle
const uint8_t kMitsubishi112SwingVMiddle
Definition: ir_Mitsubishi.h:190
Mitsubishi112Protocol::SwingV
uint8_t SwingV
Definition: ir_Mitsubishi.h:162
IRMitsubishi112::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Mitsubishi.cpp:1377
kMitsubishi112SwingVLowest
const uint8_t kMitsubishi112SwingVLowest
Definition: ir_Mitsubishi.h:188
kMitsubishi112SwingVAuto
const uint8_t kMitsubishi112SwingVAuto
Definition: ir_Mitsubishi.h:193
Mitsubishi112Protocol::pad1
uint8_t pad1[3]
Definition: ir_Mitsubishi.h:165
kMitsubishi112FanQuiet
const uint8_t kMitsubishi112FanQuiet
Definition: ir_Mitsubishi.h:187
Mitsubishi144Protocol::Timer
uint8_t Timer
Definition: ir_Mitsubishi.h:74
IRMitsubishi112::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Mitsubishi.cpp:1280
kMitsubishi112SwingHLeft
const uint8_t kMitsubishi112SwingHLeft
Definition: ir_Mitsubishi.h:196
IRMitsubishi112::getQuiet
bool getQuiet(void) const
Get the Quiet mode of the A/C.
Definition: ir_Mitsubishi.cpp:1455
IRMitsubishiAC::getVane
uint8_t getVane(void) const
Get the Vane (Vertical Swing) mode of the A/C.
Definition: ir_Mitsubishi.cpp:531
Mitsubishi144Protocol::StartClock
uint8_t StartClock
Definition: ir_Mitsubishi.h:72
kMitsubishi112FanMed
const uint8_t kMitsubishi112FanMed
Definition: ir_Mitsubishi.h:185
kMitsubishiACStateLength
const uint16_t kMitsubishiACStateLength
Definition: IRremoteESP8266.h:1004
Mitsubishi112Protocol::Fan
uint8_t Fan
Definition: ir_Mitsubishi.h:161
kMitsubishiAcHeat
const uint8_t kMitsubishiAcHeat
Definition: ir_Mitsubishi.h:87
kMitsubishiAcAuto
const uint8_t kMitsubishiAcAuto
Definition: ir_Mitsubishi.h:84
IRMitsubishi136::_
Mitsubishi136Protocol _
Definition: ir_Mitsubishi.h:334
IRMitsubishi136::toString
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_Mitsubishi.cpp:1135
IRMitsubishi112::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Mitsubishi.cpp:1293
IRMitsubishi136::getTemp
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Mitsubishi.cpp:952
IRMitsubishi112::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Mitsubishi.cpp:1365
kMitsubishi112SwingHRight
const uint8_t kMitsubishi112SwingHRight
Definition: ir_Mitsubishi.h:198
kMitsubishiAcFanSilent
const uint8_t kMitsubishiAcFanSilent
Definition: ir_Mitsubishi.h:91
IRMitsubishi112::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Mitsubishi.h:350
Mitsubishi112Protocol::SwingH
uint8_t SwingH
Definition: ir_Mitsubishi.h:168
kMitsubishiAcVaneAuto
const uint8_t kMitsubishiAcVaneAuto
Definition: ir_Mitsubishi.h:95
kMitsubishi112SwingHRightMax
const uint8_t kMitsubishi112SwingHRightMax
Definition: ir_Mitsubishi.h:199
IRMitsubishi136::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Mitsubishi.cpp:868
IRMitsubishiAC::getClock
uint8_t getClock(void) const
Get the clock time of the A/C unit.
Definition: ir_Mitsubishi.cpp:544
IRMitsubishi136::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Mitsubishi.cpp:901
IRMitsubishi112::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Mitsubishi.cpp:1572
kMitsubishi136MinRepeat
const uint16_t kMitsubishi136MinRepeat
Definition: IRremoteESP8266.h:1009
stdAc::swingv_t
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:70
IRMitsubishi112::getTemp
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Mitsubishi.cpp:1344
IRMitsubishiAC::stateReset
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Mitsubishi.cpp:386
IRMitsubishiAC::setVane
void setVane(const uint8_t position)
Set the requested vane (Vertical Swing) operation mode of the a/c unit.
Definition: ir_Mitsubishi.cpp:517
kMitsubishi136FanMed
const uint8_t kMitsubishi136FanMed
Definition: ir_Mitsubishi.h:140
Mitsubishi136Protocol::raw
uint8_t raw[kMitsubishi136StateLength]
The state in code form.
Definition: ir_Mitsubishi.h:105
kMitsubishi136PowerByte
const uint8_t kMitsubishi136PowerByte
Definition: ir_Mitsubishi.h:125
IRMitsubishi112::getSwingH
uint8_t getSwingH(void) const
Get the Horizontal Swing mode of the A/C.
Definition: ir_Mitsubishi.cpp:1438
stdAc::fanspeed_t
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
IRMitsubishiAC::getTemp
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Mitsubishi.cpp:466
IRMitsubishiAC::setStopClock
void setStopClock(const uint8_t clock)
Set the desired stop time of the A/C unit.
Definition: ir_Mitsubishi.cpp:573
kMitsubishi136MaxTemp
const uint8_t kMitsubishi136MaxTemp
Definition: ir_Mitsubishi.h:127
Mitsubishi112Protocol::Temp
uint8_t Temp
Definition: ir_Mitsubishi.h:158
IRMitsubishi136::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Mitsubishi.cpp:1031
IRMitsubishiAC::setRaw
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_Mitsubishi.cpp:415
IRMitsubishi136::setFan
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Mitsubishi.cpp:958
IRMitsubishiAC::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Mitsubishi.cpp:452
kMitsubishi112MinRepeat
const uint16_t kMitsubishi112MinRepeat
Definition: IRremoteESP8266.h:1012
IRMitsubishi112::setRaw
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_Mitsubishi.cpp:1312
IRMitsubishiAC::setStartClock
void setStartClock(const uint8_t clock)
Set the desired start time of the A/C unit.
Definition: ir_Mitsubishi.cpp:561
kMitsubishi112FanLow
const uint8_t kMitsubishi112FanLow
Definition: ir_Mitsubishi.h:184
IRMitsubishi112::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Mitsubishi.cpp:1531
IRMitsubishiAC::checksum
void checksum(void)
Calculate and set the checksum values for the internal state.
Definition: ir_Mitsubishi.cpp:420
IRMitsubishi136::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Mitsubishi.cpp:964
kMitsubishi112Heat
const uint8_t kMitsubishi112Heat
Definition: ir_Mitsubishi.h:176
kMitsubishi112SwingHLeftMax
const uint8_t kMitsubishi112SwingHLeftMax
Definition: ir_Mitsubishi.h:195
IRMitsubishiAC::validChecksum
static bool validChecksum(const uint8_t *data)
Verify the checksum is valid for a given state.
Definition: ir_Mitsubishi.cpp:427
IRMitsubishi136::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Mitsubishi.h:296
kMitsubishi112Cool
const uint8_t kMitsubishi112Cool
Definition: ir_Mitsubishi.h:175
IRMitsubishi136::setQuiet
void setQuiet(const bool on)
Set the Quiet mode of the A/C.
Definition: ir_Mitsubishi.cpp:1016
IRsend.h
IRMitsubishi112::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Mitsubishi.cpp:1330
Mitsubishi144Protocol::StopClock
uint8_t StopClock
Definition: ir_Mitsubishi.h:70
kMitsubishiAcNoTimer
const uint8_t kMitsubishiAcNoTimer
Definition: ir_Mitsubishi.h:97
IRMitsubishi112::send
void send(const uint16_t repeat=kMitsubishi112MinRepeat)
Send the current internal state as an IR message.
Definition: ir_Mitsubishi.cpp:1298
IRMitsubishi112::getSwingV
uint8_t getSwingV(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_Mitsubishi.cpp:1412
IRMitsubishiAC::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_Mitsubishi.cpp:446
IRMitsubishi112::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Mitsubishi.cpp:1519
IRMitsubishiAC::calculateChecksum
static uint8_t calculateChecksum(const uint8_t *data)
Calculate the checksum for a given state.
Definition: ir_Mitsubishi.cpp:434
IRsend
Class for sending all basic IR protocols.
Definition: IRsend.h:182
Mitsubishi144Protocol::Temp
uint8_t Temp
Definition: ir_Mitsubishi.h:58
IRsend::calibrate
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
kMitsubishi136Cool
const uint8_t kMitsubishi136Cool
Definition: ir_Mitsubishi.h:129
kMitsubishi136Dry
const uint8_t kMitsubishi136Dry
Definition: ir_Mitsubishi.h:132
IRMitsubishi112::IRMitsubishi112
IRMitsubishi112(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Mitsubishi.cpp:1275
IRMitsubishiAC::setClock
void setClock(const uint8_t clock)
Set the clock time on the A/C unit.
Definition: ir_Mitsubishi.cpp:549
Mitsubishi112Protocol::Sum
uint8_t Sum
Definition: ir_Mitsubishi.h:171
IRMitsubishiAC::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Mitsubishi.cpp:494
String
std::string String
Definition: IRremoteESP8266.h:1178
IRMitsubishiAC
Class for handling detailed Mitsubishi 144-bit A/C messages.
Definition: ir_Mitsubishi.h:221
IRMitsubishiAC::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Mitsubishi.cpp:710
Mitsubishi144Protocol::Vane
uint8_t Vane
Definition: ir_Mitsubishi.h:64
IRMitsubishi112::toString
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_Mitsubishi.cpp:1600
IRMitsubishiAC::convertSwingV
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Mitsubishi.cpp:625
IRMitsubishiAC::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Mitsubishi.cpp:668
IRMitsubishi112
Class for handling detailed Mitsubishi 122-bit A/C messages.
Definition: ir_Mitsubishi.h:339
Mitsubishi136Protocol::Temp
uint8_t Temp
Definition: ir_Mitsubishi.h:116
IRMitsubishiAC::setFan
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Mitsubishi.cpp:472
kMitsubishi112SwingVLow
const uint8_t kMitsubishi112SwingVLow
Definition: ir_Mitsubishi.h:189
IRMitsubishiAC::convertSwingH
static uint8_t convertSwingH(const stdAc::swingh_t position)
Convert a stdAc::swingh_t enum into it's native setting.
Definition: ir_Mitsubishi.cpp:640
IRMitsubishi112::setTemp
void setTemp(const uint8_t degrees)
Set the temperature.
Definition: ir_Mitsubishi.cpp:1336
kMitsubishi112SwingHAuto
const uint8_t kMitsubishi112SwingHAuto
Definition: ir_Mitsubishi.h:201
kMitsubishi112MinTemp
const uint8_t kMitsubishi112MinTemp
Definition: ir_Mitsubishi.h:180
IRMitsubishi136
Class for handling detailed Mitsubishi 136-bit A/C messages.
Definition: ir_Mitsubishi.h:285
Mitsubishi144Protocol::Clock
uint8_t Clock
Definition: ir_Mitsubishi.h:68
IRMitsubishi112::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_Mitsubishi.cpp:1324
IRMitsubishi112::checksum
void checksum(void)
Calculate the checksum for the current internal state of the remote.
Definition: ir_Mitsubishi.cpp:1288
IRremoteESP8266.h
stdAc::swingh_t
swingh_t
Common A/C settings for Horizontal Swing.
Definition: IRsend.h:83
IRMitsubishiAC::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Mitsubishi.cpp:598
kMitsubishiAcStopTimer
const uint8_t kMitsubishiAcStopTimer
Definition: ir_Mitsubishi.h:99
kMitsubishiAcFanMax
const uint8_t kMitsubishiAcFanMax
Definition: ir_Mitsubishi.h:89
Mitsubishi144Protocol::pad1
uint8_t pad1[3]
Definition: ir_Mitsubishi.h:77
Mitsubishi136Protocol::Mode
uint8_t Mode
Definition: ir_Mitsubishi.h:114
IRMitsubishiAC::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Mitsubishi.cpp:486
kMitsubishi112SwingVHighest
const uint8_t kMitsubishi112SwingVHighest
Definition: ir_Mitsubishi.h:192
IRMitsubishiAC::toCommonSwingH
static stdAc::swingh_t toCommonSwingH(const uint8_t pos)
Convert a native horizontal swing postion to it's common equivalent.
Definition: ir_Mitsubishi.cpp:696
kMitsubishi136FanLow
const uint8_t kMitsubishi136FanLow
Definition: ir_Mitsubishi.h:139
kMitsubishiACMinRepeat
const uint16_t kMitsubishiACMinRepeat
Definition: IRremoteESP8266.h:1006
kMitsubishi136MinTemp
const uint8_t kMitsubishi136MinTemp
Definition: ir_Mitsubishi.h:126
Mitsubishi144Protocol::Power
uint8_t Power
Definition: ir_Mitsubishi.h:51
IRMitsubishi136::toCommonSwingV
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_Mitsubishi.cpp:1097
IRMitsubishi136::IRMitsubishi136
IRMitsubishi136(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Mitsubishi.cpp:863
Mitsubishi112Protocol::pad0
uint8_t pad0[5]
Definition: ir_Mitsubishi.h:149
IRMitsubishiAC::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_Mitsubishi.h:273
kMitsubishi136Auto
const uint8_t kMitsubishi136Auto
Definition: ir_Mitsubishi.h:131
IRMitsubishiAC::_
Mitsubishi144Protocol _
Definition: ir_Mitsubishi.h:279
kMitsubishi136FanMax
const uint8_t kMitsubishi136FanMax
Definition: ir_Mitsubishi.h:141
IRMitsubishiAC::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Mitsubishi.cpp:408
kMitsubishiAcFanAuto
const uint8_t kMitsubishiAcFanAuto
Definition: ir_Mitsubishi.h:88
IRMitsubishiAC::getStopClock
uint8_t getStopClock(void) const
Get the desired stop time of the A/C unit.
Definition: ir_Mitsubishi.cpp:568
IRMitsubishiAC::on
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Mitsubishi.cpp:439
Mitsubishi136Protocol::Fan
uint8_t Fan
Definition: ir_Mitsubishi.h:119
kMitsubishiAcFanQuiet
const uint8_t kMitsubishiAcFanQuiet
Definition: ir_Mitsubishi.h:92
IRMitsubishi112::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Mitsubishi.cpp:1475
IRMitsubishi112::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Mitsubishi.cpp:1462
Mitsubishi144Protocol::raw
uint8_t raw[kMitsubishiACStateLength]
The state in code form.
Definition: ir_Mitsubishi.h:45
kMitsubishiAcWideVaneAuto
const uint8_t kMitsubishiAcWideVaneAuto
Definition: ir_Mitsubishi.h:101
IRMitsubishi136::send
void send(const uint16_t repeat=kMitsubishi136MinRepeat)
Send the current internal state as an IR message.
Definition: ir_Mitsubishi.cpp:906
kMitsubishi136Fan
const uint8_t kMitsubishi136Fan
Definition: ir_Mitsubishi.h:128
IRMitsubishi112::setFan
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Mitsubishi.cpp:1350
Mitsubishi136Protocol::Power
uint8_t Power
Definition: ir_Mitsubishi.h:111
IRMitsubishiAC::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Mitsubishi.h:233
IRMitsubishi112::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Mitsubishi.cpp:1320
IRMitsubishiAC::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Mitsubishi.cpp:500
Mitsubishi144Protocol::FanAuto
uint8_t FanAuto
Definition: ir_Mitsubishi.h:66
IRMitsubishi112::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Mitsubishi.cpp:1305
IRMitsubishi112::convertSwingH
static uint8_t convertSwingH(const stdAc::swingh_t position)
Convert a stdAc::swingh_t enum into it's native setting.
Definition: ir_Mitsubishi.cpp:1503
IRMitsubishi112::setSwingH
void setSwingH(const uint8_t position)
Set the Horizontal Swing mode of the A/C.
Definition: ir_Mitsubishi.cpp:1418
IRMitsubishi136::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Mitsubishi.cpp:1071
Mitsubishi144Protocol::Fan
uint8_t Fan
Definition: ir_Mitsubishi.h:63
IRMitsubishiAC::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Mitsubishi.cpp:396
Mitsubishi112Protocol::raw
uint8_t raw[kMitsubishi112StateLength]
The state in code form.
Definition: ir_Mitsubishi.h:146
IRMitsubishiAC::IRMitsubishiAC
IRMitsubishiAC(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Mitsubishi.cpp:381
kMitsubishi136FanMin
const uint8_t kMitsubishi136FanMin
Definition: ir_Mitsubishi.h:138
kMitsubishi136SwingVAuto
const uint8_t kMitsubishi136SwingVAuto
Definition: ir_Mitsubishi.h:137
IRMitsubishi112::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_Mitsubishi.h:384
kMitsubishi136Heat
const uint8_t kMitsubishi136Heat
Definition: ir_Mitsubishi.h:130
IRMitsubishi136::setTemp
void setTemp(const uint8_t degrees)
Set the temperature.
Definition: ir_Mitsubishi.cpp:944
Mitsubishi112Protocol::Power
uint8_t Power
Definition: ir_Mitsubishi.h:152
IRMitsubishiAC::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Mitsubishi.cpp:656
IRMitsubishi136::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Mitsubishi.cpp:970
IRMitsubishi136::checksum
void checksum(void)
Calculate the checksum for the current internal state of the remote.
Definition: ir_Mitsubishi.cpp:878
IRMitsubishiAC::getStartClock
uint8_t getStartClock(void) const
Get the desired start time of the A/C unit.
Definition: ir_Mitsubishi.cpp:556
kMitsubishi112FanMin
const uint8_t kMitsubishi112FanMin
Definition: ir_Mitsubishi.h:183
kMitsubishiAcFanRealMax
const uint8_t kMitsubishiAcFanRealMax
Definition: ir_Mitsubishi.h:90
kMitsubishiAcStartStopTimer
const uint8_t kMitsubishiAcStartStopTimer
Definition: ir_Mitsubishi.h:100
IRMitsubishiAC::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Mitsubishi.cpp:610
kMitsubishi112SwingVHigh
const uint8_t kMitsubishi112SwingVHigh
Definition: ir_Mitsubishi.h:191
kMitsubishi112SwingHMiddle
const uint8_t kMitsubishi112SwingHMiddle
Definition: ir_Mitsubishi.h:197
kMitsubishi136SwingVLow
const uint8_t kMitsubishi136SwingVLow
Definition: ir_Mitsubishi.h:134
IRMitsubishi112::_
Mitsubishi112Protocol _
Definition: ir_Mitsubishi.h:390
IRMitsubishiAC::getTimer
uint8_t getTimer(void) const
Get the timers active setting of the A/C.
Definition: ir_Mitsubishi.cpp:582
Mitsubishi144Protocol::Sum
uint8_t Sum
Definition: ir_Mitsubishi.h:79
IRMitsubishi136::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Mitsubishi.cpp:1044
kMitsubishiAcVaneAutoMove
const uint8_t kMitsubishiAcVaneAutoMove
Definition: ir_Mitsubishi.h:96
IRMitsubishiAC::send
void send(const uint16_t repeat=kMitsubishiACMinRepeat)
Send the current internal state as an IR message.
Definition: ir_Mitsubishi.cpp:401
IRMitsubishi136::getRaw
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Mitsubishi.cpp:913
IRMitsubishiAC::setWideVane
void setWideVane(const uint8_t position)
Set the requested wide-vane (Horizontal Swing) operation mode of the a/c.
Definition: ir_Mitsubishi.cpp:525
IRMitsubishi136::getQuiet
bool getQuiet(void) const
Get the Quiet mode of the A/C.
Definition: ir_Mitsubishi.cpp:1024
kMitsubishi112Auto
const uint8_t kMitsubishi112Auto
Definition: ir_Mitsubishi.h:177
kMitsubishiAcMinTemp
const uint8_t kMitsubishiAcMinTemp
Definition: ir_Mitsubishi.h:93
IRMitsubishi112::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Mitsubishi.cpp:1371
kMitsubishi136SwingVLowest
const uint8_t kMitsubishi136SwingVLowest
Definition: ir_Mitsubishi.h:133
kMitsubishiAcStartTimer
const uint8_t kMitsubishiAcStartTimer
Definition: ir_Mitsubishi.h:98
IRMitsubishi136::setRaw
void setRaw(const uint8_t *data)
Set the internal state from a valid code for this protocol.
Definition: ir_Mitsubishi.cpp:920
IRMitsubishi136::convertSwingV
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Mitsubishi.cpp:1057
IRMitsubishi112::toCommonSwingV
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_Mitsubishi.cpp:1544
kMitsubishi112FanMax
const uint8_t kMitsubishi112FanMax
Definition: ir_Mitsubishi.h:186
IRMitsubishiAC::getWideVane
uint8_t getWideVane(void) const
Get the Wide Vane (Horizontal Swing) mode of the A/C.
Definition: ir_Mitsubishi.cpp:537
Mitsubishi144Protocol::pad0
uint8_t pad0[5]
Definition: ir_Mitsubishi.h:48
IRMitsubishi112::on
void on(void)
Set the requested power state of the A/C to off.
Definition: ir_Mitsubishi.cpp:1317
Mitsubishi144Protocol::VaneBit
uint8_t VaneBit
Definition: ir_Mitsubishi.h:65
IRMitsubishi136::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_Mitsubishi.h:328
IRMitsubishi136::setSwingV
void setSwingV(const uint8_t position)
Set the Vertical Swing mode of the A/C.
Definition: ir_Mitsubishi.cpp:993
kMitsubishi136FanQuiet
const uint8_t kMitsubishi136FanQuiet
Definition: ir_Mitsubishi.h:142
IRMitsubishi112::setQuiet
void setQuiet(const bool on)
Set the Quiet mode of the A/C.
Definition: ir_Mitsubishi.cpp:1445
Mitsubishi112Protocol
Native representation of a Mitsubishi 112-bit A/C message.
Definition: ir_Mitsubishi.h:145
IRMitsubishi112::setSwingV
void setSwingV(const uint8_t position)
Set the Vertical Swing mode of the A/C.
Definition: ir_Mitsubishi.cpp:1394
IRMitsubishi136::toCommon
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Mitsubishi.cpp:1109
IRMitsubishi136::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Mitsubishi.cpp:1084
IRMitsubishi112::toCommonSwingH
static stdAc::swingh_t toCommonSwingH(const uint8_t pos)
Convert a native horizontal swing postion to it's common equivalent.
Definition: ir_Mitsubishi.cpp:1558
Mitsubishi112Protocol::Mode
uint8_t Mode
Definition: ir_Mitsubishi.h:155
IRMitsubishi136::getSwingV
uint8_t getSwingV(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_Mitsubishi.cpp:1010
IRMitsubishi136::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Mitsubishi.cpp:928
IRMitsubishiAC::setTemp
void setTemp(const uint8_t degrees)
Set the temperature.
Definition: ir_Mitsubishi.cpp:458
kMitsubishiAcMaxTemp
const uint8_t kMitsubishiAcMaxTemp
Definition: ir_Mitsubishi.h:94
Mitsubishi144Protocol
Native representation of a Mitsubishi 144-bit A/C message.
Definition: ir_Mitsubishi.h:44
Mitsubishi144Protocol::Mode
uint8_t Mode
Definition: ir_Mitsubishi.h:55
kMitsubishi136StateLength
const uint16_t kMitsubishi136StateLength
Definition: IRremoteESP8266.h:1007
kMitsubishi136SwingVHigh
const uint8_t kMitsubishi136SwingVHigh
Definition: ir_Mitsubishi.h:135
kMitsubishiAcCool
const uint8_t kMitsubishiAcCool
Definition: ir_Mitsubishi.h:85
IRMitsubishiAC::toCommonSwingV
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a native vertical swing postion to it's common equivalent.
Definition: ir_Mitsubishi.cpp:682
IRMitsubishiAC::toString
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_Mitsubishi.cpp:736
kMitsubishi112SwingHWide
const uint8_t kMitsubishi112SwingHWide
Definition: ir_Mitsubishi.h:200
IRMitsubishi136::on
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Mitsubishi.cpp:925
IRMitsubishi112::convertSwingV
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Mitsubishi.cpp:1489
kMitsubishi112Dry
const uint8_t kMitsubishi112Dry
Definition: ir_Mitsubishi.h:178
Mitsubishi136Protocol
Native representation of a Mitsubishi 136-bit A/C message.
Definition: ir_Mitsubishi.h:104
IRMitsubishi136::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Mitsubishi.cpp:938
kMitsubishi136SwingVHighest
const uint8_t kMitsubishi136SwingVHighest
Definition: ir_Mitsubishi.h:136
IRMitsubishi136::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_Mitsubishi.cpp:932
IRMitsubishiAC::setTimer
void setTimer(const uint8_t timer)
Set the timers active setting of the A/C.
Definition: ir_Mitsubishi.cpp:591
stdAc::state_t
Structure to hold a common A/C state.
Definition: IRsend.h:97
Mitsubishi136Protocol::pad
uint8_t pad[5]
Definition: ir_Mitsubishi.h:108
IRMitsubishiAC::off
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Mitsubishi.cpp:442
Mitsubishi136Protocol::SwingV
uint8_t SwingV
Definition: ir_Mitsubishi.h:121
kMitsubishi112StateLength
const uint16_t kMitsubishi112StateLength
Definition: IRremoteESP8266.h:1010
kMitsubishi112MaxTemp
const uint8_t kMitsubishi112MaxTemp
Definition: ir_Mitsubishi.h:181
IRMitsubishi136::validChecksum
static bool validChecksum(const uint8_t *data, const uint16_t len=kMitsubishi136StateLength)
Verify the checksum is valid for a given state.
Definition: ir_Mitsubishi.cpp:888
Mitsubishi144Protocol::WideVane
uint8_t WideVane
Definition: ir_Mitsubishi.h:61
kMitsubishiAcDry
const uint8_t kMitsubishiAcDry
Definition: ir_Mitsubishi.h:86
IRMitsubishi136::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Mitsubishi.cpp:976
stdAc::opmode_t
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46