IRremoteESP8266
ir_LG.h
Go to the documentation of this file.
1 // Copyright 2017-2021 David Conran
2 
7 
8 // Supports:
9 // Brand: LG, Model: 6711A20083V remote (LG)
10 // Brand: LG, Model: AKB74395308 remote (LG2)
11 // Brand: LG, Model: S4-W12JA3AA A/C (LG2)
12 // Brand: LG, Model: AKB75215403 remote (LG2)
13 // Brand: LG, Model: AKB74955603 remote (LG2 - AKB74955603)
14 // Brand: LG, Model: A4UW30GFA2 A/C (LG2 - AKB74955603 & AKB73757604)
15 // Brand: LG, Model: AMNW09GSJA0 A/C (LG2 - AKB74955603)
16 // Brand: LG, Model: AMNW24GTPA1 A/C (LG2 - AKB73757604)
17 // Brand: LG, Model: AKB73757604 remote (LG2 - AKB73757604)
18 // Brand: General Electric, Model: AG1BH09AW101 Split A/C (LG)
19 // Brand: General Electric, Model: 6711AR2853M A/C Remote (LG)
20 
21 #ifndef IR_LG_H_
22 #define IR_LG_H_
23 
24 #define __STDC_LIMIT_MACROS
25 #include <stdint.h>
26 #ifndef UNIT_TEST
27 #include <Arduino.h>
28 #endif
29 #include "IRremoteESP8266.h"
30 #include "IRsend.h"
31 #include "IRutils.h"
32 #ifdef UNIT_TEST
33 #include "IRsend_test.h"
34 #endif
35 
37 union LGProtocol{
38  uint32_t raw;
39  struct {
40  uint32_t Sum :4;
41  uint32_t Fan :4;
42  uint32_t Temp :4;
43  uint32_t Mode :3;
44  uint32_t :3;
45  uint32_t Power:2;
46  uint32_t Sign :8;
47  };
48 };
49 
50 const uint8_t kLgAcFanLowest = 0; // 0b0000
51 const uint8_t kLgAcFanLow = 1; // 0b0001
52 const uint8_t kLgAcFanMedium = 2; // 0b0010
53 const uint8_t kLgAcFanMax = 4; // 0b0100
54 const uint8_t kLgAcFanAuto = 5; // 0b0101
55 const uint8_t kLgAcFanLowAlt = 9; // 0b1001
56 const uint8_t kLgAcFanHigh = 10; // 0b1010
57 // Nr. of slots in the look-up table
58 const uint8_t kLgAcFanEntries = kLgAcFanHigh + 1;
59 const uint8_t kLgAcTempAdjust = 15;
60 const uint8_t kLgAcMinTemp = 16; // Celsius
61 const uint8_t kLgAcMaxTemp = 30; // Celsius
62 const uint8_t kLgAcCool = 0; // 0b000
63 const uint8_t kLgAcDry = 1; // 0b001
64 const uint8_t kLgAcFan = 2; // 0b010
65 const uint8_t kLgAcAuto = 3; // 0b011
66 const uint8_t kLgAcHeat = 4; // 0b100
67 const uint8_t kLgAcPowerOff = 3; // 0b11
68 const uint8_t kLgAcPowerOn = 0; // 0b00
69 const uint8_t kLgAcSignature = 0x88;
70 
71 const uint32_t kLgAcOffCommand = 0x88C0051;
72 const uint32_t kLgAcLightToggle = 0x88C00A6;
73 
74 const uint32_t kLgAcSwingSignature = 0x8813;
75 const uint32_t kLgAcSwingVLowest = 0x8813048;
76 const uint32_t kLgAcSwingVLow = 0x8813059;
77 const uint32_t kLgAcSwingVMiddle = 0x881306A;
78 const uint32_t kLgAcSwingVUpperMiddle = 0x881307B;
79 const uint32_t kLgAcSwingVHigh = 0x881308C;
80 const uint32_t kLgAcSwingVHighest = 0x881309D;
81 const uint32_t kLgAcSwingVSwing = 0x8813149;
83 const uint32_t kLgAcSwingVOff = 0x881315A;
84 const uint8_t kLgAcSwingVLowest_Short = 0x04;
85 const uint8_t kLgAcSwingVLow_Short = 0x05;
86 const uint8_t kLgAcSwingVMiddle_Short = 0x06;
87 const uint8_t kLgAcSwingVUpperMiddle_Short = 0x07;
88 const uint8_t kLgAcSwingVHigh_Short = 0x08;
89 const uint8_t kLgAcSwingVHighest_Short = 0x09;
90 const uint8_t kLgAcSwingVSwing_Short = 0x14;
92 const uint8_t kLgAcSwingVOff_Short = 0x15;
93 
94 // AKB73757604 Constants
95 // SwingH
96 const uint32_t kLgAcSwingHAuto = 0x881316B;
97 const uint32_t kLgAcSwingHOff = 0x881317C;
98 // SwingV
99 const uint8_t kLgAcVaneSwingVHighest = 1;
100 const uint8_t kLgAcVaneSwingVHigh = 2;
101 const uint8_t kLgAcVaneSwingVUpperMiddle = 3;
102 const uint8_t kLgAcVaneSwingVMiddle = 4;
103 const uint8_t kLgAcVaneSwingVLow = 5;
104 const uint8_t kLgAcVaneSwingVLowest = 6;
105 const uint8_t kLgAcVaneSwingVSize = 8;
106 const uint8_t kLgAcSwingVMaxVanes = 4;
107 
108 // Classes
110 class IRLgAc {
111  public:
112  explicit IRLgAc(const uint16_t pin, const bool inverted = false,
113  const bool use_modulation = true);
114  void stateReset(void);
115  static uint8_t calcChecksum(const uint32_t state);
116  static bool validChecksum(const uint32_t state);
117  bool isValidLgAc(void) const;
118 #if SEND_LG
119  void send(const uint16_t repeat = kLgDefaultRepeat);
124  int8_t calibrate(void) { return _irsend.calibrate(); }
125 #endif // SEND_LG
126  void begin(void);
127  void on(void);
128  void off(void);
129  void setPower(const bool on);
130  bool getPower(void) const;
131  bool isOffCommand(void) const;
132  void setTemp(const uint8_t degrees);
133  uint8_t getTemp(void) const;
134  void setFan(const uint8_t speed);
135  uint8_t getFan(void) const;
136  void setMode(const uint8_t mode);
137  uint8_t getMode(void) const;
138  void setLight(const bool on);
139  bool getLight(void) const;
140  bool isLightToggle(void) const;
141  bool isSwing(void) const;
142  void setSwingH(const bool on);
143  bool getSwingH(void) const;
144  bool isSwingV(void) const;
145  bool isVaneSwingV(void) const;
146  void setSwingV(const uint32_t position);
147  uint32_t getSwingV(void) const;
148  void setVaneSwingV(const uint8_t vane, const uint8_t position);
149  uint8_t getVaneSwingV(const uint8_t vane) const;
150  static uint32_t calcVaneSwingV(const uint8_t vane, const uint8_t position);
151  static uint8_t getVaneCode(const uint32_t raw);
152  bool isSwingH(void) const;
153  void updateSwingPrev(void);
154  uint32_t getRaw(void);
155  void setRaw(const uint32_t new_code,
156  const decode_type_t protocol = decode_type_t::UNKNOWN);
157  static uint8_t convertMode(const stdAc::opmode_t mode);
158  static stdAc::opmode_t toCommonMode(const uint8_t mode);
159  static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed);
160  static stdAc::swingv_t toCommonSwingV(const uint32_t code);
161  static stdAc::swingv_t toCommonVaneSwingV(const uint8_t pos);
162  static uint8_t convertFan(const stdAc::fanspeed_t speed);
163  static uint32_t convertSwingV(const stdAc::swingv_t swingv);
164  static uint8_t convertVaneSwingV(const stdAc::swingv_t swingv);
165  stdAc::state_t toCommon(const stdAc::state_t *prev = NULL) const;
166  String toString(void) const;
167  void setModel(const lg_ac_remote_model_t model);
168  lg_ac_remote_model_t getModel(void) const;
169 #ifndef UNIT_TEST
170 
171  private:
173 #else // UNIT_TEST
174  IRsendTest _irsend;
176 #endif // UNIT_TEST
179  uint8_t _temp;
180  bool _light;
181  uint32_t _swingv;
182  uint32_t _swingv_prev;
185  bool _swingh;
189  void checksum(void);
190  void _setTemp(const uint8_t value);
191  bool _isAKB74955603(void) const;
192  bool _isAKB73757604(void) const;
193  bool _isNormal(void) const;
194 };
195 
196 #endif // IR_LG_H_
kLgAcFanMedium
const uint8_t kLgAcFanMedium
Definition: ir_LG.h:52
IRLgAc::_setTemp
void _setTemp(const uint8_t value)
Set the temperature.
Definition: ir_LG.cpp:446
IRLgAc::toCommonMode
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_LG.cpp:635
IRLgAc::getFan
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_LG.cpp:502
kLgAcSwingVLowest
const uint32_t kLgAcSwingVLowest
Definition: ir_LG.h:75
decode_type_t
decode_type_t
Enumerator for defining and numbering of supported IR protocol.
Definition: IRremoteESP8266.h:845
IRLgAc::getSwingV
uint32_t getSwingV(void) const
Get the Vertical Swing position setting of the A/C.
Definition: ir_LG.cpp:585
IRLgAc::getRaw
uint32_t getRaw(void)
Get a copy of the internal state/code for this protocol.
Definition: ir_LG.cpp:343
IRLgAc::setVaneSwingV
void setVaneSwingV(const uint8_t vane, const uint8_t position)
Set the per Vane Vertical Swing mode of the A/C.
Definition: ir_LG.cpp:590
IRLgAc::_protocol
decode_type_t _protocol
Protocol version.
Definition: ir_LG.h:187
IRLgAc::getTemp
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_LG.cpp:459
IRLgAc::setSwingV
void setSwingV(const uint32_t position)
Set the Vertical Swing mode of the A/C.
Definition: ir_LG.cpp:563
UNKNOWN
@ UNKNOWN
Definition: IRremoteESP8266.h:846
stdAc::swingv_t
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:70
IRLgAc::calibrate
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_LG.h:124
kLgAcLightToggle
const uint32_t kLgAcLightToggle
Definition: ir_LG.h:72
kLgAcVaneSwingVMiddle
const uint8_t kLgAcVaneSwingVMiddle
0b100
Definition: ir_LG.h:102
kLgAcFanAuto
const uint8_t kLgAcFanAuto
Definition: ir_LG.h:54
kLgAcSwingVOff
const uint32_t kLgAcSwingVOff
Definition: ir_LG.h:83
stdAc::fanspeed_t
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
IRLgAc::isSwing
bool isSwing(void) const
Check if the stored code is a Swing message.
Definition: ir_LG.cpp:526
kLgAcPowerOff
const uint8_t kLgAcPowerOff
Definition: ir_LG.h:67
kLgAcFanLowest
const uint8_t kLgAcFanLowest
Definition: ir_LG.h:50
IRLgAc::setFan
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_LG.cpp:465
kLgAcVaneSwingVHigh
const uint8_t kLgAcVaneSwingVHigh
0b010
Definition: ir_LG.h:100
IRLgAc::getPower
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_LG.cpp:423
LGProtocol::Temp
uint32_t Temp
Definition: ir_LG.h:42
IRLgAc::isLightToggle
bool isLightToggle(void) const
Is the message a Light Toggle message?
Definition: ir_LG.cpp:441
kLgAcSwingVOff_Short
const uint8_t kLgAcSwingVOff_Short
Definition: ir_LG.h:92
kLgAcFanHigh
const uint8_t kLgAcFanHigh
Definition: ir_LG.h:56
kLgAcSwingVSwing_Short
const uint8_t kLgAcSwingVSwing_Short
Definition: ir_LG.h:90
IRsend.h
IRLgAc::updateSwingPrev
void updateSwingPrev(void)
Definition: ir_LG.cpp:577
IRLgAc::isSwingV
bool isSwingV(void) const
Check if the stored code is a non-vane SwingV message.
Definition: ir_LG.cpp:532
LGProtocol::Sign
uint32_t Sign
Definition: ir_LG.h:46
IRLgAc::toString
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_LG.cpp:780
kLgAcSwingVLow
const uint32_t kLgAcSwingVLow
Definition: ir_LG.h:76
IRsend
Class for sending all basic IR protocols.
Definition: IRsend.h:190
kLgAcDry
const uint8_t kLgAcDry
Definition: ir_LG.h:63
kLgAcVaneSwingVHighest
const uint8_t kLgAcVaneSwingVHighest
0b001
Definition: ir_LG.h:99
IRLgAc::setTemp
void setTemp(const uint8_t degrees)
Set the temperature.
Definition: ir_LG.cpp:450
IRsend::calibrate
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
kLgAcFanEntries
const uint8_t kLgAcFanEntries
Definition: ir_LG.h:58
IRLgAc::_isNormal
bool _isNormal(void) const
Is the current message a normal (non-special) message?
Definition: ir_LG.cpp:292
IRLgAc::_
LGProtocol _
Definition: ir_LG.h:178
kLgAcSwingVSwing
const uint32_t kLgAcSwingVSwing
Definition: ir_LG.h:81
kLgAcFanLowAlt
const uint8_t kLgAcFanLowAlt
Definition: ir_LG.h:55
kLgAcOffCommand
const uint32_t kLgAcOffCommand
Definition: ir_LG.h:71
IRLgAc::getVaneSwingV
uint8_t getVaneSwingV(const uint8_t vane) const
Get the Vertical Swing position for the given vane of the A/C.
Definition: ir_LG.cpp:598
String
std::string String
Definition: IRremoteESP8266.h:1279
IRLgAc::_swingh
bool _swingh
Definition: ir_LG.h:185
IRLgAc::calcChecksum
static uint8_t calcChecksum(const uint32_t state)
Calculate the checksum for a given state.
Definition: ir_LG.cpp:387
kLgAcFanLow
const uint8_t kLgAcFanLow
Definition: ir_LG.h:51
IRLgAc::setModel
void setModel(const lg_ac_remote_model_t model)
Set the model of the A/C to emulate.
Definition: ir_LG.cpp:304
kLgDefaultRepeat
const uint16_t kLgDefaultRepeat
Definition: IRremoteESP8266.h:1078
kLgAcMaxTemp
const uint8_t kLgAcMaxTemp
Definition: ir_LG.h:61
IRLgAc::isOffCommand
bool isOffCommand(void) const
Is the message a Power Off message?
Definition: ir_LG.cpp:429
IRLgAc::_vaneswingv_prev
uint8_t _vaneswingv_prev[kLgAcSwingVMaxVanes]
Definition: ir_LG.h:184
kLgAcSwingVMiddle
const uint32_t kLgAcSwingVMiddle
Definition: ir_LG.h:77
IRLgAc::_swingv_prev
uint32_t _swingv_prev
Definition: ir_LG.h:182
IRLgAc::IRLgAc
IRLgAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_LG.cpp:231
kLgAcSignature
const uint8_t kLgAcSignature
Definition: ir_LG.h:69
kLgAcSwingSignature
const uint32_t kLgAcSwingSignature
Definition: ir_LG.h:74
IRremoteESP8266.h
IRLgAc::convertFan
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_LG.cpp:648
IRLgAc::getMode
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_LG.cpp:506
kLgAcSwingVHigh
const uint32_t kLgAcSwingVHigh
Definition: ir_LG.h:79
IRLgAc::_isAKB73757604
bool _isAKB73757604(void) const
Check if the stored code must belong to a AKB73757604 model.
Definition: ir_LG.cpp:337
IRLgAc::toCommonFanSpeed
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_LG.cpp:662
kLgAcSwingVLow_Short
const uint8_t kLgAcSwingVLow_Short
Definition: ir_LG.h:85
IRLgAc::convertSwingV
static uint32_t convertSwingV(const stdAc::swingv_t swingv)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_LG.cpp:677
IRLgAc::_swingv
uint32_t _swingv
Definition: ir_LG.h:181
IRLgAc::setSwingH
void setSwingH(const bool on)
Set the Horizontal Swing mode of the A/C.
Definition: ir_LG.cpp:550
LGProtocol::raw
uint32_t raw
The state of the IR remote in IR code form.
Definition: ir_LG.h:38
kLgAcCool
const uint8_t kLgAcCool
Definition: ir_LG.h:62
kLgAcSwingVLowest_Short
const uint8_t kLgAcSwingVLowest_Short
Definition: ir_LG.h:84
kLgAcSwingVMaxVanes
const uint8_t kLgAcSwingVMaxVanes
Max Nr. of Vanes.
Definition: ir_LG.h:106
kLgAcSwingVAuto_Short
const uint8_t kLgAcSwingVAuto_Short
Definition: ir_LG.h:91
IRLgAc::getSwingH
bool getSwingH(void) const
Get the Horizontal Swing position setting of the A/C.
Definition: ir_LG.cpp:546
kLgAcHeat
const uint8_t kLgAcHeat
Definition: ir_LG.h:66
kLgAcSwingVHighest_Short
const uint8_t kLgAcSwingVHighest_Short
Definition: ir_LG.h:89
IRLgAc::calcVaneSwingV
static uint32_t calcVaneSwingV(const uint8_t vane, const uint8_t position)
Calculate the Vane specific Vertical Swing code for the A/C.
Definition: ir_LG.cpp:611
kLgAcFanMax
const uint8_t kLgAcFanMax
Definition: ir_LG.h:53
kLgAcSwingVUpperMiddle
const uint32_t kLgAcSwingVUpperMiddle
Definition: ir_LG.h:78
IRLgAc::begin
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_LG.cpp:248
IRLgAc::_swingh_prev
bool _swingh_prev
Definition: ir_LG.h:186
IRLgAc::setRaw
void setRaw(const uint32_t new_code, const decode_type_t protocol=decode_type_t::UNKNOWN)
Set the internal state from a valid code for this protocol.
Definition: ir_LG.cpp:351
kLgAcVaneSwingVLow
const uint8_t kLgAcVaneSwingVLow
0b101
Definition: ir_LG.h:103
kLgAcVaneSwingVSize
const uint8_t kLgAcVaneSwingVSize
Definition: ir_LG.h:105
IRLgAc::toCommon
stdAc::state_t toCommon(const stdAc::state_t *prev=NULL) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_LG.cpp:742
IRLgAc::_isAKB74955603
bool _isAKB74955603(void) const
Check if the stored code must belong to a AKB74955603 model.
Definition: ir_LG.cpp:329
IRLgAc
Class for handling detailed LG A/C messages.
Definition: ir_LG.h:110
kLgAcSwingVAuto
const uint32_t kLgAcSwingVAuto
Definition: ir_LG.h:82
IRutils.h
IRLgAc::getModel
lg_ac_remote_model_t getModel(void) const
Get the model of the A/C.
Definition: ir_LG.cpp:322
kLgAcSwingHAuto
const uint32_t kLgAcSwingHAuto
Definition: ir_LG.h:96
LGProtocol::Fan
uint32_t Fan
Definition: ir_LG.h:41
IRLgAc::_light
bool _light
Definition: ir_LG.h:180
IRLgAc::_vaneswingv
uint8_t _vaneswingv[kLgAcSwingVMaxVanes]
Definition: ir_LG.h:183
IRLgAc::convertVaneSwingV
static uint8_t convertVaneSwingV(const stdAc::swingv_t swingv)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_LG.cpp:729
lg_ac_remote_model_t
lg_ac_remote_model_t
LG A/C model numbers.
Definition: IRsend.h:176
kLgAcSwingHOff
const uint32_t kLgAcSwingHOff
Definition: ir_LG.h:97
kLgAcSwingVUpperMiddle_Short
const uint8_t kLgAcSwingVUpperMiddle_Short
Definition: ir_LG.h:87
IRLgAc::setMode
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_LG.cpp:510
IRLgAc::_model
lg_ac_remote_model_t _model
Model type.
Definition: ir_LG.h:188
IRLgAc::_temp
uint8_t _temp
Definition: ir_LG.h:179
IRLgAc::toCommonSwingV
static stdAc::swingv_t toCommonSwingV(const uint32_t code)
Convert a native Vertical Swing into its stdAc equivalent.
Definition: ir_LG.cpp:692
kLgAcAuto
const uint8_t kLgAcAuto
Definition: ir_LG.h:65
kLgAcPowerOn
const uint8_t kLgAcPowerOn
Definition: ir_LG.h:68
kLgAcVaneSwingVLowest
const uint8_t kLgAcVaneSwingVLowest
0b110
Definition: ir_LG.h:104
IRLgAc::isSwingH
bool isSwingH(void) const
Check if the stored code is a SwingH message.
Definition: ir_LG.cpp:540
IRLgAc::off
void off(void)
Change the power setting to Off.
Definition: ir_LG.cpp:409
IRLgAc::getVaneCode
static uint8_t getVaneCode(const uint32_t raw)
Get the vane code of a Vane Vertical Swing message.
Definition: ir_LG.cpp:605
IRLgAc::checksum
void checksum(void)
Calculate and set the checksum values for the internal state.
Definition: ir_LG.cpp:401
IRLgAc::setLight
void setLight(const bool on)
Change the light/led/display setting.
Definition: ir_LG.cpp:433
IRLgAc::stateReset
void stateReset(void)
Reset the internals of the object to a known good state.
Definition: ir_LG.cpp:236
kLgAcMinTemp
const uint8_t kLgAcMinTemp
Definition: ir_LG.h:60
kLgAcTempAdjust
const uint8_t kLgAcTempAdjust
Definition: ir_LG.h:59
LGProtocol::Mode
uint32_t Mode
Definition: ir_LG.h:43
LGProtocol::Sum
uint32_t Sum
Definition: ir_LG.h:40
kLgAcVaneSwingVUpperMiddle
const uint8_t kLgAcVaneSwingVUpperMiddle
0b011
Definition: ir_LG.h:101
IRLgAc::convertMode
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_LG.cpp:622
kLgAcSwingVMiddle_Short
const uint8_t kLgAcSwingVMiddle_Short
Definition: ir_LG.h:86
IRLgAc::setPower
void setPower(const bool on)
Change the power setting.
Definition: ir_LG.cpp:413
kLgAcSwingVHigh_Short
const uint8_t kLgAcSwingVHigh_Short
Definition: ir_LG.h:88
stdAc::state_t
Structure to hold a common A/C state.
Definition: IRsend.h:97
IRLgAc::send
void send(const uint16_t repeat=kLgDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_LG.cpp:253
IRLgAc::validChecksum
static bool validChecksum(const uint32_t state)
Verify the checksum is valid for a given state.
Definition: ir_LG.cpp:394
kLgAcFan
const uint8_t kLgAcFan
Definition: ir_LG.h:64
IRLgAc::on
void on(void)
Change the power setting to On.
Definition: ir_LG.cpp:406
LGProtocol::Power
uint32_t Power
Definition: ir_LG.h:45
IRLgAc::toCommonVaneSwingV
static stdAc::swingv_t toCommonVaneSwingV(const uint8_t pos)
Convert a native Vane specific Vertical Swing into its stdAc equivalent.
Definition: ir_LG.cpp:715
IRLgAc::getLight
bool getLight(void) const
Get the value of the current light setting.
Definition: ir_LG.cpp:437
IRLgAc::_irsend
IRsend _irsend
Instance of the IR send class.
Definition: ir_LG.h:172
LGProtocol
Native representation of a LG A/C message.
Definition: ir_LG.h:37
IRLgAc::isValidLgAc
bool isValidLgAc(void) const
Check if the internal state looks like a valid LG A/C message.
Definition: ir_LG.cpp:836
kLgAcSwingVHighest
const uint32_t kLgAcSwingVHighest
Definition: ir_LG.h:80
stdAc::opmode_t
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46
IRLgAc::isVaneSwingV
bool isVaneSwingV(void) const
Check if the stored code is a vane specific SwingV message.
Definition: ir_LG.cpp:554