Go to the documentation of this file.
15 #ifndef IR_NEOCLIMA_H_
16 #define IR_NEOCLIMA_H_
18 #define __STDC_LIMIT_MACROS
26 #include "IRsend_test.h"
122 explicit IRNeoclimaAc(
const uint16_t pin,
const bool inverted =
false,
123 const bool use_modulation =
true);
132 #endif // SEND_NEOCLIMA
140 void setMode(
const uint8_t mode);
142 void setTemp(
const uint8_t temp,
const bool celsius =
true);
144 void setFan(
const uint8_t speed);
145 uint8_t
getFan(
void)
const;
173 void setRaw(
const uint8_t new_code[],
198 #endif // IR_NEOCLIMA_H_
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Neoclima.cpp:178
uint8_t Hold
Definition: ir_Neoclima.h:45
const uint8_t kNeoclimaFanHigh
Definition: ir_Neoclima.h:102
bool getEcono(void) const
Get the Economy (Energy Saver) setting of the A/C.
Definition: ir_Neoclima.cpp:375
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Neoclima.cpp:305
const uint8_t kNeoclimaMinTempC
Definition: ir_Neoclima.h:108
const uint8_t kNeoclimaButtonFanSpeed
Definition: ir_Neoclima.h:85
const uint8_t kNeoclimaButtonTurbo
Definition: ir_Neoclima.h:89
const uint8_t kNeoclimaFollowMe
Definition: ir_Neoclima.h:106
NeoclimaProtocol _
Definition: ir_Neoclima.h:194
uint8_t Mode
Definition: ir_Neoclima.h:70
const uint8_t kNeoclimaMaxTempC
Definition: ir_Neoclima.h:109
uint8_t raw[kNeoclimaStateLength]
State of the remote in code.
Definition: ir_Neoclima.h:31
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint8_t SwingV
Definition: ir_Neoclima.h:62
const uint8_t kNeoclimaDry
Definition: ir_Neoclima.h:114
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kNeoclimaStateLength)
Calculate the checksum for a given state.
Definition: ir_Neoclima.cpp:83
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Neoclima.h:131
uint8_t SwingH
Definition: ir_Neoclima.h:63
void set8CHeat(const bool on)
Set the 8°C Heat setting of the A/C.
Definition: ir_Neoclima.cpp:437
const uint8_t kNeoclimaButtonEye
Definition: ir_Neoclima.h:92
const uint8_t kNeoclimaButtonPower
Definition: ir_Neoclima.h:80
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Neoclima.cpp:263
const uint8_t kNeoclimaSwingVOn
Definition: ir_Neoclima.h:99
const uint8_t kNeoclimaButtonMode
Definition: ir_Neoclima.h:81
const uint16_t kNeoclimaStateLength
Definition: IRremoteESP8266.h:1333
Native representation of a Neoclima A/C message.
Definition: ir_Neoclima.h:30
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Neoclima.cpp:284
void setHold(const bool on)
Set the Hold setting of the A/C.
Definition: ir_Neoclima.cpp:394
const uint8_t kNeoclimaMinTempF
Definition: ir_Neoclima.h:110
void setRaw(const uint8_t new_code[], const uint16_t length=kNeoclimaStateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Neoclima.cpp:124
const uint8_t kNeoclimaButtonHold
Definition: ir_Neoclima.h:87
uint8_t Power
Definition: ir_Neoclima.h:61
void setEcono(const bool on)
Set the Economy (Energy Saver) setting of the A/C.
Definition: ir_Neoclima.cpp:368
uint8_t Eye
Definition: ir_Neoclima.h:49
void setTemp(const uint8_t temp, const bool celsius=true)
Set the temperature.
Definition: ir_Neoclima.cpp:239
bool getSleep(void) const
Get the Sleep setting of the A/C.
Definition: ir_Neoclima.cpp:323
bool getTurbo(void) const
Get the Turbo setting of the A/C.
Definition: ir_Neoclima.cpp:362
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Neoclima.cpp:206
const uint8_t kNeoclimaAuto
Definition: ir_Neoclima.h:112
const uint8_t kNeoclimaMaxTempF
Definition: ir_Neoclima.h:111
void setLight(const bool on)
Set the Light(LED display) setting of the A/C.
Definition: ir_Neoclima.cpp:420
const uint8_t kNeoclimaFan
Definition: ir_Neoclima.h:115
Class for sending all basic IR protocols.
Definition: IRsend.h:237
bool get8CHeat(void) const
Get the 8°C Heat setting of the A/C.
Definition: ir_Neoclima.cpp:444
uint8_t Sleep
Definition: ir_Neoclima.h:60
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Neoclima.cpp:116
const uint8_t kNeoclimaFanAuto
Definition: ir_Neoclima.h:101
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
uint8_t Econo
Definition: ir_Neoclima.h:47
std::string String
Definition: IRremoteESP8266.h:1521
bool getEye(void) const
Get the Eye (Sensor) setting of the A/C.
Definition: ir_Neoclima.cpp:457
uint8_t getButton(void) const
Get the Button/Command setting of the A/C.
Definition: ir_Neoclima.cpp:159
bool getIon(void) const
Get the Ion (filter) setting of the A/C.
Definition: ir_Neoclima.cpp:414
const uint8_t kNeoclimaButtonFresh
Definition: ir_Neoclima.h:95
uint8_t Turbo
Definition: ir_Neoclima.h:46
const uint8_t kNeoclimaButtonEcono
Definition: ir_Neoclima.h:91
uint8_t Temp
Definition: ir_Neoclima.h:69
const uint8_t kNeoclimaButtonAirFlow
Definition: ir_Neoclima.h:86
uint8_t Button
Definition: ir_Neoclima.h:54
uint8_t CHeat
Definition: ir_Neoclima.h:37
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Neoclima.cpp:70
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Neoclima.cpp:291
const uint8_t kNeoclimaButtonTempDown
Definition: ir_Neoclima.h:83
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Neoclima.cpp:77
const uint8_t kNeoclimaButtonLight
Definition: ir_Neoclima.h:90
void setIon(const bool on)
Set the Ion (filter) setting of the A/C.
Definition: ir_Neoclima.cpp:407
bool getLight(void) const
Get the Light (LED display) setting of the A/C.
Definition: ir_Neoclima.cpp:427
uint8_t Follow
Definition: ir_Neoclima.h:67
const uint8_t kNeoclimaButtonSwing
Definition: ir_Neoclima.h:84
const uint8_t kNeoclimaButtonFollow
Definition: ir_Neoclima.h:93
IRsend _irsend
Instance of the IR send class.
Definition: ir_Neoclima.h:188
const uint8_t kNeoclimaSwingVOff
Definition: ir_Neoclima.h:100
bool getSwingV(void) const
Get the vertical swing setting of the A/C.
Definition: ir_Neoclima.cpp:336
void setSwingV(const bool on)
Set the vertical swing setting of the A/C.
Definition: ir_Neoclima.cpp:329
void setEye(const bool on)
Set the Eye (Sensor) setting of the A/C.
Definition: ir_Neoclima.cpp:450
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Neoclima.cpp:226
const uint8_t kNeoclimaButtonSleep
Definition: ir_Neoclima.h:88
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Neoclima.cpp:486
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Neoclima.cpp:164
uint8_t UseFah
Definition: ir_Neoclima.h:65
const uint8_t kNeoclimaFanMed
Definition: ir_Neoclima.h:103
bool getFresh(void) const
Get the Fresh (air) setting of the A/C.
Definition: ir_Neoclima.cpp:388
const uint8_t kNeoclimaButtonTempUnit
Definition: ir_Neoclima.h:97
void setFresh(const bool on)
Set the Fresh (air) setting of the A/C.
Definition: ir_Neoclima.cpp:381
bool getHold(void) const
Get the Hold setting of the A/C.
Definition: ir_Neoclima.cpp:401
void setPower(const bool on)
Change the power setting.
Definition: ir_Neoclima.cpp:171
const uint8_t kNeoclimaCool
Definition: ir_Neoclima.h:113
const uint8_t kNeoclimaButton8CHeat
Definition: ir_Neoclima.h:96
uint8_t Ion
Definition: ir_Neoclima.h:38
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Neoclima.cpp:255
bool getFollow(void) const
Get the Follow Me setting of the A/C.
Definition: ir_Neoclima.cpp:480
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Neoclima.cpp:213
const uint8_t kNeoclimaHeat
Definition: ir_Neoclima.h:116
void setButton(const uint8_t button)
Set the Button/Command pressed setting of the A/C.
Definition: ir_Neoclima.cpp:130
const uint8_t kNeoclimaButtonIon
Definition: ir_Neoclima.h:94
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Neoclima.cpp:514
uint8_t Sum
Definition: ir_Neoclima.h:74
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Neoclima.cpp:184
const uint8_t kNeoclimaFanLow
Definition: ir_Neoclima.h:104
void setTurbo(const bool on)
Set the Turbo setting of the A/C.
Definition: ir_Neoclima.cpp:355
bool getTempUnits(void) const
Is the A/C unit using Fahrenheit or Celsius for temperature units.
Definition: ir_Neoclima.cpp:463
uint8_t Light
Definition: ir_Neoclima.h:43
bool getSwingH(void) const
Get the horizontal swing (Air Flow) setting of the A/C.
Definition: ir_Neoclima.cpp:349
void checksum(const uint16_t length=kNeoclimaStateLength)
Calculate & update the checksum for the internal state.
Definition: ir_Neoclima.cpp:101
void setSwingH(const bool on)
Set the horizontal swing setting of the A/C.
Definition: ir_Neoclima.cpp:342
void send(const uint16_t repeat=kNeoclimaMinRepeat)
Send the current internal state as an IR message.
Definition: ir_Neoclima.cpp:109
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Neoclima.cpp:167
uint8_t Fan
Definition: ir_Neoclima.h:64
uint8_t Fresh
Definition: ir_Neoclima.h:56
Structure to hold a common A/C state.
Definition: IRsend.h:114
const uint16_t kNeoclimaMinRepeat
Definition: IRremoteESP8266.h:1335
IRNeoclimaAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Neoclima.cpp:63
Class for handling detailed Neoclima A/C messages.
Definition: ir_Neoclima.h:120
void setSleep(const bool on)
Set the Sleep setting of the A/C.
Definition: ir_Neoclima.cpp:316
static bool validChecksum(const uint8_t state[], const uint16_t length=kNeoclimaStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Neoclima.cpp:93
const uint8_t kNeoclimaButtonTempUp
Definition: ir_Neoclima.h:82
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49