Go to the documentation of this file.
23 #define __STDC_LIMIT_MACROS
31 #include "IRsend_test.h"
91 explicit IRCarrierAc64(
const uint16_t pin,
const bool inverted =
false,
92 const bool use_modulation =
true);
102 #endif // SEND_CARRIER_AC64
110 void setTemp(
const uint8_t temp);
116 void setFan(
const uint8_t speed);
117 uint8_t
getFan(
void)
const;
118 void setMode(
const uint8_t mode);
125 void setRaw(
const uint64_t state);
146 #endif // IR_CARRIER_H_
const uint8_t kCarrierAc64MinTemp
Definition: ir_Carrier.h:80
const uint8_t kCarrierAc64TimerMin
Definition: ir_Carrier.h:83
void on(void)
Change the power setting to On.
Definition: ir_Carrier.cpp:330
void setPower(const bool on)
Change the power setting.
Definition: ir_Carrier.cpp:319
uint8_t Sleep
Definition: ir_Carrier.h:56
uint8_t getTemp(void) const
Get the current temperature from the internal state.
Definition: ir_Carrier.cpp:313
void checksum(void)
Calculate and set the checksum values for the internal state.
Definition: ir_Carrier.cpp:277
stdAc::state_t toCommon(void) const
Convert the A/C state to it's common stdAc::state_t equivalent.
Definition: ir_Carrier.cpp:533
IRCarrierAc64(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Carrier.cpp:246
uint8_t Fan
Definition: ir_Carrier.h:45
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint8_t OnTimer
Definition: ir_Carrier.h:61
uint8_t OffTimerEnable
Definition: ir_Carrier.h:54
const uint8_t kCarrierAc64Heat
Definition: ir_Carrier.h:73
Class for sending all basic IR protocols.
Definition: IRsend.h:237
void _cancelOnTimer(void)
Clear the On Timer enable bit.
Definition: ir_Carrier.cpp:450
void begin()
Set up hardware to be able to send a message.
Definition: ir_Carrier.cpp:282
const uint8_t kCarrierAc64Cool
Definition: ir_Carrier.h:74
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode to it's common stdAc::opmode_t equivalent.
Definition: ir_Carrier.cpp:369
std::string String
Definition: IRremoteESP8266.h:1521
uint16_t getOffTimer(void) const
Get the current Off Timer time.
Definition: ir_Carrier.cpp:486
void setTemp(const uint8_t temp)
Set the temp in deg C.
Definition: ir_Carrier.cpp:305
void send(const uint16_t repeat=kCarrierAc64MinRepeat)
Send the current internal state as an IR message.
Definition: ir_Carrier.cpp:287
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Carrier.cpp:395
void setOffTimer(const uint16_t nr_of_mins)
Set the Off Timer time.
Definition: ir_Carrier.cpp:497
const uint8_t kCarrierAc64TimerMax
Definition: ir_Carrier.h:82
const uint8_t kCarrierAc64FanHigh
Definition: ir_Carrier.h:79
Native representation of a Carrier A/C message.
Definition: ir_Carrier.h:35
CarrierProtocol _
Definition: ir_Carrier.h:141
static bool validChecksum(const uint64_t state)
Verify the checksum is valid for a given state.
Definition: ir_Carrier.cpp:270
uint8_t Mode
Definition: ir_Carrier.h:44
const uint8_t kCarrierAc64FanMedium
Definition: ir_Carrier.h:78
const uint8_t kCarrierAc64MaxTemp
Definition: ir_Carrier.h:81
Class for handling detailed Carrier 64 bit A/C messages.
Definition: ir_Carrier.h:89
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Carrier.cpp:337
IRsend _irsend
Instance of the IR send class.
Definition: ir_Carrier.h:135
void stateReset()
Reset the internal state to a fixed known good state.
Definition: ir_Carrier.cpp:252
void off(void)
Change the power setting to Off.
Definition: ir_Carrier.cpp:333
uint8_t OffTimer
Definition: ir_Carrier.h:64
static uint8_t calcChecksum(const uint64_t state)
Calculate the checksum for a given state.
Definition: ir_Carrier.cpp:257
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Carrier.h:101
uint8_t Sum
Definition: ir_Carrier.h:43
void setRaw(const uint64_t state)
Set the internal state from a valid code for this protocol.
Definition: ir_Carrier.cpp:301
uint8_t Power
Definition: ir_Carrier.h:53
bool getSwingV(void) const
Get the Vertical Swing mode of the A/C.
Definition: ir_Carrier.cpp:426
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Carrier.cpp:325
const uint8_t kCarrierAc64Fan
Definition: ir_Carrier.h:75
const uint8_t kCarrierAc64ChecksumSize
Definition: ir_Carrier.h:72
uint8_t SwingV
Definition: ir_Carrier.h:49
void setOnTimer(const uint16_t nr_of_mins)
Set the On Timer time.
Definition: ir_Carrier.cpp:468
uint64_t getRaw(void)
Get a copy of the internal state as a valid code for this protocol.
Definition: ir_Carrier.cpp:294
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a standard A/C mode into its native mode.
Definition: ir_Carrier.cpp:358
const uint16_t kCarrierAc64MinRepeat
Definition: IRremoteESP8266.h:1178
const uint8_t kCarrierAc64FanLow
Definition: ir_Carrier.h:77
const uint8_t kCarrierAc64FanAuto
Definition: ir_Carrier.h:76
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Carrier.cpp:409
uint64_t raw
The state of the IR remote.
Definition: ir_Carrier.h:36
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Carrier.cpp:385
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Carrier.cpp:343
void setSwingV(const bool on)
Set the Vertical Swing mode of the A/C.
Definition: ir_Carrier.cpp:420
void setSleep(const bool on)
Set the Sleep mode of the A/C.
Definition: ir_Carrier.cpp:432
void _cancelOffTimer(void)
Clear the Off Timer enable bit.
Definition: ir_Carrier.cpp:479
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_Carrier.cpp:510
bool getSleep(void) const
Get the Sleep mode of the A/C.
Definition: ir_Carrier.cpp:445
Structure to hold a common A/C state.
Definition: IRsend.h:114
uint8_t Temp
Definition: ir_Carrier.h:47
uint8_t OnTimerEnable
Definition: ir_Carrier.h:55
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Carrier.cpp:379
uint16_t getOnTimer(void) const
Get the current On Timer time.
Definition: ir_Carrier.cpp:457
const uint8_t kCarrierAc64ChecksumOffset
Definition: ir_Carrier.h:71
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49