Go to the documentation of this file.
14 #define __STDC_LIMIT_MACROS
22 #include "IRsend_test.h"
102 explicit IRVestelAc(
const uint16_t pin,
const bool inverted =
false,
103 const bool use_modulation =
true);
112 #endif // SEND_VESTEL_AC
118 void setAuto(
const int8_t autoLevel);
119 void setTimer(
const uint16_t minutes);
121 void setTime(
const uint16_t minutes);
127 void setTemp(
const uint8_t temp);
129 void setFan(
const uint8_t fan);
130 uint8_t
getFan(
void)
const;
131 void setMode(
const uint8_t mode);
133 void setRaw(
const uint8_t* newState);
134 void setRaw(
const uint64_t newState);
172 #endif // IR_VESTEL_H_
const uint16_t kVestelAcHdrSpace
Definition: ir_Vestel.h:65
const uint8_t kVestelAcFanAutoHot
Definition: ir_Vestel.h:86
void stateReset(void)
Reset the state of the remote to a known good state/sequence.
Definition: ir_Vestel.cpp:58
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Vestel.cpp:64
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Vestel.cpp:140
uint64_t Timer
Definition: ir_Vestel.h:57
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Vestel.cpp:125
void setOffTimerActive(const bool on)
Set the Off timer to be active on the A/C.
Definition: ir_Vestel.cpp:282
void setTime(const uint16_t minutes)
Set the A/C's internal clock.
Definition: ir_Vestel.cpp:240
uint64_t OffHours
Definition: ir_Vestel.h:51
const uint8_t kVestelAcMaxTemp
Definition: ir_Vestel.h:73
void setPower(const bool on)
Change the power setting.
Definition: ir_Vestel.cpp:112
uint16_t getOnTimer(void) const
Get the A/C's On Timer time.
Definition: ir_Vestel.cpp:276
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Vestel.cpp:158
uint16_t getTimer(void) const
Get the Timer time of A/C.
Definition: ir_Vestel.cpp:236
bool isOnTimerActive(void) const
Get if the On Timer is active on the A/C.
Definition: ir_Vestel.cpp:261
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint64_t Swing
Definition: ir_Vestel.h:35
const uint8_t kVestelAcSleep
Definition: ir_Vestel.h:89
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Vestel.h:111
const uint8_t kVestelAcDry
Definition: ir_Vestel.h:77
bool getIon(void) const
Get the Ion (Filter) setting of the A/C.
Definition: ir_Vestel.cpp:343
const uint16_t kVestelAcBitMark
Definition: ir_Vestel.h:66
const uint8_t kVestelAcAuto
Definition: ir_Vestel.h:75
const uint8_t kVestelAcFanMed
Definition: ir_Vestel.h:83
void setTurbo(const bool on)
Set the Turbo setting of the A/C.
Definition: ir_Vestel.cpp:323
IRsend _irsend
Instance of the IR send class.
Definition: ir_Vestel.h:162
void setTimer(const uint16_t minutes)
Set Timer option of A/C.
Definition: ir_Vestel.cpp:221
void on(void)
Set the requested power state of the A/C to on.
Definition: ir_Vestel.cpp:105
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Vestel.cpp:171
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Vestel.cpp:471
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Vestel.cpp:444
const uint8_t kVestelAcMinTempC
Definition: ir_Vestel.h:72
Native representation of a Vestel A/C message.
Definition: ir_Vestel.h:26
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
std::string String
Definition: IRremoteESP8266.h:1521
uint16_t getTime(void) const
Get the A/C's internal clock's time.
Definition: ir_Vestel.cpp:248
uint64_t CmdSum
Definition: ir_Vestel.h:34
void setRaw(const uint8_t *newState)
Set the internal state from a valid code for this protocol.
Definition: ir_Vestel.cpp:84
const uint8_t kVestelAcFan
Definition: ir_Vestel.h:78
bool isOffTimerActive(void) const
Get if the Off Timer is active on the A/C.
Definition: ir_Vestel.cpp:289
const uint8_t kVestelAcMinTempH
Definition: ir_Vestel.h:71
uint64_t OffTimer
Definition: ir_Vestel.h:56
const uint16_t kVestelAcHdrMark
Definition: ir_Vestel.h:64
const uint16_t kNoRepeat
Definition: IRremoteESP8266.h:1145
bool isTimeCommand(void) const
Is the current state a time command?
Definition: ir_Vestel.cpp:386
uint64_t Power
Definition: ir_Vestel.h:44
uint16_t getOffTimer(void) const
Get the A/C's Off Timer time.
Definition: ir_Vestel.cpp:304
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Vestel.cpp:420
bool getTurbo(void) const
Get the Turbo setting of the A/C.
Definition: ir_Vestel.cpp:330
uint64_t Ion
Definition: ir_Vestel.h:42
const uint16_t kVestelAcOneSpace
Definition: ir_Vestel.h:67
uint64_t Hours
Definition: ir_Vestel.h:54
void checksum(void)
Calculate & set the checksum for the current internal state of the remote.
Definition: ir_Vestel.cpp:378
void setSwing(const bool on)
Set the Swing Roaming setting of the A/C.
Definition: ir_Vestel.cpp:349
bool getSwing(void) const
Get the Swing Roaming setting of the A/C.
Definition: ir_Vestel.cpp:356
uint64_t OffTenMins
Definition: ir_Vestel.h:50
void setOffTimer(const uint16_t minutes)
Set the Off timer time on the A/C.
Definition: ir_Vestel.cpp:295
uint64_t timeState
Definition: ir_Vestel.h:29
uint64_t OnHours
Definition: ir_Vestel.h:53
uint64_t TurboSleep
Definition: ir_Vestel.h:36
void setOnTimerActive(const bool on)
Set the On timer to be active on the A/C.
Definition: ir_Vestel.cpp:254
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Vestel.cpp:433
void send(const uint16_t repeat=kNoRepeat)
Send the current internal state as an IR message.
Definition: ir_Vestel.cpp:69
void off(void)
Set the requested power state of the A/C to off.
Definition: ir_Vestel.cpp:108
const uint8_t kVestelAcFanAutoCool
Definition: ir_Vestel.h:85
const uint64_t kVestelAcStateDefault
Definition: ir_Vestel.h:95
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Vestel.cpp:393
void setIon(const bool on)
Set the Ion (Filter) setting of the A/C.
Definition: ir_Vestel.cpp:336
const uint16_t kVestelAcTolerance
Definition: ir_Vestel.h:69
const uint8_t kVestelAcFanLow
Definition: ir_Vestel.h:82
uint64_t Mode
Definition: ir_Vestel.h:40
uint64_t Fan
Definition: ir_Vestel.h:39
const uint8_t kVestelAcSwing
Definition: ir_Vestel.h:92
const uint16_t kVestelAcZeroSpace
Definition: ir_Vestel.h:68
bool getSleep(void) const
Get the Sleep setting of the A/C.
Definition: ir_Vestel.cpp:317
const uint64_t kVestelAcTimeStateDefault
Definition: ir_Vestel.h:96
uint64_t OnTenMins
Definition: ir_Vestel.h:52
const uint8_t kVestelAcTurbo
Definition: ir_Vestel.h:90
static uint8_t calcChecksum(const uint64_t state)
Calculate the checksum for a given state.
Definition: ir_Vestel.cpp:363
uint64_t getRaw(void)
Get a copy of the internal state/code for this protocol.
Definition: ir_Vestel.cpp:76
const uint8_t kVestelAcHeat
Definition: ir_Vestel.h:79
const uint8_t kVestelAcNormal
Definition: ir_Vestel.h:88
const uint8_t kVestelAcFanHigh
Definition: ir_Vestel.h:84
uint64_t Signature
Definition: ir_Vestel.h:33
IRVestelAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Vestel.cpp:52
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Vestel.cpp:119
Class for handling detailed Vestel A/C messages.
Definition: ir_Vestel.h:100
const uint8_t kVestelAcCool
Definition: ir_Vestel.h:76
VestelProtocol _
Definition: ir_Vestel.h:168
uint64_t cmdState
Definition: ir_Vestel.h:28
bool isTimerActive(void) const
Get if the Timer is active on the A/C.
Definition: ir_Vestel.cpp:213
void setTimerActive(const bool on)
Set the timer to be active on the A/C.
Definition: ir_Vestel.cpp:206
void setSleep(const bool on)
Set the Sleep setting of the A/C.
Definition: ir_Vestel.cpp:310
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Vestel.cpp:164
uint64_t UseCmd
Definition: ir_Vestel.h:45
uint64_t OnTimer
Definition: ir_Vestel.h:55
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Vestel.cpp:134
const uint8_t kVestelAcIon
Definition: ir_Vestel.h:91
uint64_t Minutes
Definition: ir_Vestel.h:58
uint64_t Temp
Definition: ir_Vestel.h:38
static bool validChecksum(const uint64_t state)
Verify the checksum is valid for a given state.
Definition: ir_Vestel.cpp:371
void setAuto(const int8_t autoLevel)
Set Auto mode/level of the A/C.
Definition: ir_Vestel.cpp:188
Structure to hold a common A/C state.
Definition: IRsend.h:114
const uint8_t kVestelAcFanAuto
Definition: ir_Vestel.h:81
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Vestel.cpp:406
void setOnTimer(const uint16_t minutes)
Set the On timer time on the A/C.
Definition: ir_Vestel.cpp:267
uint64_t TimeSum
Definition: ir_Vestel.h:49
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49