Go to the documentation of this file.
17 #define __STDC_LIMIT_MACROS
25 #include "IRsend_test.h"
93 explicit IRVoltas(
const uint16_t pin,
const bool inverted =
false,
94 const bool use_modulation =
true);
103 #endif // SEND_VOLTAS
115 void setTemp(
const uint8_t temp);
117 void setFan(
const uint8_t speed);
119 void setMode(
const uint8_t mode);
136 void setOnTime(
const uint16_t nr_of_mins);
140 void setRaw(
const uint8_t new_code[]);
162 #endif // IR_VOLTAS_H_
void setOnTime(const uint16_t nr_of_mins)
Set the value of the On Timer time.
Definition: ir_Voltas.cpp:423
uint8_t getTemp(void)
Get the current temperature setting.
Definition: ir_Voltas.cpp:258
uint8_t Temp
Definition: ir_Voltas.h:47
const uint8_t kVoltasFan
1
Definition: ir_Voltas.h:75
uint8_t getFan(void)
Get the current fan speed setting.
Definition: ir_Voltas.cpp:282
uint8_t Mode
Definition: ir_Voltas.h:36
uint16_t getOnTime(void) const
Get the value of the On Timer time.
Definition: ir_Voltas.cpp:415
bool getEcono(void) const
Get the value of the current Econo setting.
Definition: ir_Voltas.cpp:389
uint8_t getMode(void)
Get the operating mode setting of the A/C.
Definition: ir_Voltas.cpp:222
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint8_t OnTimerMins
Definition: ir_Voltas.h:52
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Voltas.cpp:301
uint8_t Wifi
Definition: ir_Voltas.h:41
bool getSwingHChange(void) const
Are the Horizontal Swing change bits set in the message?
Definition: ir_Voltas.cpp:351
const uint8_t kVoltasFanMed
2
Definition: ir_Voltas.h:83
const uint8_t kVoltasSwingHNoChange
0x19
Definition: ir_Voltas.h:87
uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Voltas.cpp:227
uint8_t SwingH
Definition: ir_Voltas.h:33
Class for handling detailed Voltas A/C messages.
Definition: ir_Voltas.h:91
Native representation of a Voltas A/C message.
Definition: ir_Voltas.h:29
const uint8_t kVoltasFanAuto
7
Definition: ir_Voltas.h:85
Class for sending all basic IR protocols.
Definition: IRsend.h:237
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
voltas_ac_remote_model_t _model
Model type.
Definition: ir_Voltas.h:157
const uint16_t kVoltasStateLength
Definition: IRremoteESP8266.h:1427
uint8_t SwingV
Definition: ir_Voltas.h:40
void off(void)
Change the power setting to Off.
Definition: ir_Voltas.cpp:184
uint8_t Light
Definition: ir_Voltas.h:66
uint8_t OffTimerMins
Definition: ir_Voltas.h:56
std::string String
Definition: IRremoteESP8266.h:1521
uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Voltas.cpp:287
void setSleep(const bool on)
Change the Sleep setting.
Definition: ir_Voltas.cpp:402
bool getWifi(void) const
Get the value of the current Wifi setting.
Definition: ir_Voltas.cpp:361
IRVoltas(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Voltas.cpp:87
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Voltas.cpp:262
uint8_t Econo
Definition: ir_Voltas.h:49
void on(void)
Change the power setting to On.
Definition: ir_Voltas.cpp:181
void setPower(const bool on)
Change the power setting.
Definition: ir_Voltas.cpp:188
uint8_t OffTimerEnable
Definition: ir_Voltas.h:67
uint8_t OffTimer12Hr
Definition: ir_Voltas.h:58
bool getSwingV(void) const
Get the Vertical Swing setting of the A/C.
Definition: ir_Voltas.cpp:316
const uint16_t kNoRepeat
Definition: IRremoteESP8266.h:1145
const uint8_t kVoltasHeat
2
Definition: ir_Voltas.h:76
void setSwingV(const bool on)
Set the Vertical Swing setting of the A/C.
Definition: ir_Voltas.cpp:312
stdAc::state_t toCommon(const stdAc::state_t *prev=NULL)
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Voltas.cpp:456
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Voltas.cpp:250
void setRaw(const uint8_t new_code[])
Set the internal state from a valid code for this protocol.
Definition: ir_Voltas.cpp:150
uint8_t OffTimerHrs
Definition: ir_Voltas.h:63
IRsend _irsend
Instance of the IR send class.
Definition: ir_Voltas.h:150
void setTurbo(const bool on)
Change the Turbo setting.
Definition: ir_Voltas.cpp:366
uint8_t FanSpeed
Definition: ir_Voltas.h:38
void begin()
Set up hardware to be able to send a message.
Definition: ir_Voltas.cpp:103
uint8_t OnTimerHrs
Definition: ir_Voltas.h:62
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Voltas.cpp:197
uint8_t Turbo
Definition: ir_Voltas.h:43
void setSwingH(const bool on)
Set the Horizontal Swing setting of the A/C.
Definition: ir_Voltas.cpp:320
void setWifi(const bool on)
Change the Wifi setting.
Definition: ir_Voltas.cpp:357
void setSwingHChange(const bool on)
Set the bits for changing the Horizontal Swing setting of the A/C.
Definition: ir_Voltas.cpp:344
uint8_t Power
Definition: ir_Voltas.h:45
uint16_t getOffTime(void) const
Get the value of the On Timer time.
Definition: ir_Voltas.cpp:435
String toString(void)
Convert the current internal state into a human readable string.
Definition: ir_Voltas.cpp:491
void setModel(const voltas_ac_remote_model_t model)
Set the current model for the remote.
Definition: ir_Voltas.cpp:131
void stateReset()
Definition: ir_Voltas.cpp:94
void setEcono(const bool on)
Change the Economy setting.
Definition: ir_Voltas.cpp:380
uint8_t OnTimerEnable
Definition: ir_Voltas.h:68
const uint8_t kVoltasMaxTemp
Celsius.
Definition: ir_Voltas.h:81
const uint8_t kVoltasDry
4
Definition: ir_Voltas.h:77
uint8_t raw[kVoltasStateLength]
The state in native IR code form.
Definition: ir_Voltas.h:30
uint8_t TempSet
Definition: ir_Voltas.h:50
uint8_t Checksum
Definition: ir_Voltas.h:70
const uint8_t kVoltasSwingHChange
0x7D
Definition: ir_Voltas.h:86
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kVoltasStateLength)
Calculate the checksum is valid for a given state.
Definition: ir_Voltas.cpp:173
const uint8_t kVoltasMinTemp
Celsius.
Definition: ir_Voltas.h:79
void checksum(void)
Calculate and set the checksum values for the internal state.
Definition: ir_Voltas.cpp:156
const uint8_t kVoltasDryTemp
Celsius.
Definition: ir_Voltas.h:80
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Voltas.cpp:239
void send(const uint16_t repeat=kNoRepeat)
Send the current internal state as an IR message.
Definition: ir_Voltas.cpp:108
const uint8_t kVoltasFanHigh
1
Definition: ir_Voltas.h:82
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Voltas.h:102
uint8_t Sleep
Definition: ir_Voltas.h:44
bool getSwingH(void) const
Get the Horizontal Swing setting of the A/C.
Definition: ir_Voltas.cpp:332
void setOffTime(const uint16_t nr_of_mins)
Set the value of the Off Timer time.
Definition: ir_Voltas.cpp:443
uint8_t OnTimer12Hr
Definition: ir_Voltas.h:54
static bool validChecksum(const uint8_t state[], const uint16_t length=kVoltasStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Voltas.cpp:164
const uint8_t kVoltasFanLow
4
Definition: ir_Voltas.h:84
bool getSleep(void) const
Get the value of the current Sleep setting.
Definition: ir_Voltas.cpp:411
const uint8_t kVoltasCool
8
Definition: ir_Voltas.h:78
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Voltas.cpp:192
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Voltas.cpp:143
VoltasProtocol _
The state of the IR remote.
Definition: ir_Voltas.h:156
Structure to hold a common A/C state.
Definition: IRsend.h:114
bool getLight(void) const
Get the value of the current Light setting.
Definition: ir_Voltas.cpp:397
void setLight(const bool on)
Change the Light setting.
Definition: ir_Voltas.cpp:393
voltas_ac_remote_model_t getModel(const bool raw=false) const
Get the model information currently known.
Definition: ir_Voltas.cpp:116
bool getTurbo(void) const
Get the value of the current Turbo setting.
Definition: ir_Voltas.cpp:375
voltas_ac_remote_model_t
Voltas A/C model numbers.
Definition: IRsend.h:205
uint8_t SwingHChange
Definition: ir_Voltas.h:34
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49