Go to the documentation of this file.
15 #define __STDC_LIMIT_MACROS
23 #include "IRsend_test.h"
92 explicit IRAmcorAc(
const uint16_t pin,
const bool inverted =
false,
93 const bool use_modulation =
true);
113 void setTemp(
const uint8_t temp);
117 void setFan(
const uint8_t speed);
118 uint8_t
getFan(
void)
const;
119 void setMode(
const uint8_t mode);
122 void setRaw(
const uint8_t state[]);
141 #endif // IR_AMCOR_H_
uint8_t Mode
Definition: ir_Amcor.h:34
IRAmcorAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Amcor.cpp:95
uint8_t raw[kAmcorStateLength]
Definition: ir_Amcor.h:29
uint8_t * getRaw(void)
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
Definition: ir_Amcor.cpp:143
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition: ir_Amcor.cpp:236
void send(const uint16_t repeat=kAmcorDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Amcor.cpp:105
const uint8_t kAmcorCool
Definition: ir_Amcor.h:66
const uint16_t kAmcorStateLength
Definition: IRremoteESP8266.h:1155
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Amcor.cpp:292
Native representation of a Amcor A/C message.
Definition: ir_Amcor.h:28
const uint8_t kAmcorPowerOn
Definition: ir_Amcor.h:77
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kAmcorStateLength)
Calculate the checksum for the supplied state.
Definition: ir_Amcor.cpp:114
const uint8_t kAmcorMax
Definition: ir_Amcor.h:81
IRsend _irsend
Definition: ir_Amcor.h:132
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Amcor.cpp:274
const uint8_t kAmcorHeat
Definition: ir_Amcor.h:67
void begin()
Set up hardware to be able to send a message.
Definition: ir_Amcor.cpp:100
const uint8_t kAmcorFanAuto
Definition: ir_Amcor.h:64
uint8_t Fan
Definition: ir_Amcor.h:36
Class for sending all basic IR protocols.
Definition: IRsend.h:237
uint8_t getMode(void) const
Get the current operation mode setting.
Definition: ir_Amcor.cpp:230
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Amcor.cpp:209
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
Class for handling detailed Amcor A/C messages.
Definition: ir_Amcor.h:90
const uint8_t kAmcorMinTemp
Definition: ir_Amcor.h:73
void setMax(const bool on)
Control the current Maximum Cooling or Heating setting. (i.e. Turbo)
Definition: ir_Amcor.cpp:189
uint8_t Temp
Definition: ir_Amcor.h:40
void stateReset()
Reset the internals of the object to a known good state.
Definition: ir_Amcor.cpp:132
const uint8_t kAmcorFan
Definition: ir_Amcor.h:68
void setRaw(const uint8_t state[])
Set the raw state of the object.
Definition: ir_Amcor.cpp:150
const uint8_t kAmcorVentOn
Definition: ir_Amcor.h:84
const uint8_t kAmcorFanMin
Definition: ir_Amcor.h:61
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Amcor.cpp:342
uint8_t Sum
Definition: ir_Amcor.h:54
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Amcor.cpp:256
const uint8_t kAmcorDry
Definition: ir_Amcor.h:69
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Amcor.cpp:224
const uint8_t kAmcorFanMed
Definition: ir_Amcor.h:62
bool getPower(void) const
Get the power setting from the internal state.
Definition: ir_Amcor.cpp:168
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Amcor.cpp:174
void on(void)
Set the internal state to have the power on.
Definition: ir_Amcor.cpp:155
uint8_t Vent
Definition: ir_Amcor.h:52
void setPower(const bool state)
Set the internal state to have the desired power.
Definition: ir_Amcor.cpp:162
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Amcor.h:102
uint8_t Power
Definition: ir_Amcor.h:48
const uint8_t kAmcorPowerOff
Definition: ir_Amcor.h:78
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Amcor.cpp:316
void checksum(void)
Update the checksum value for the internal state.
Definition: ir_Amcor.cpp:127
uint8_t Max
Definition: ir_Amcor.h:50
static bool validChecksum(const uint8_t state[], const uint16_t length=kAmcorStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Amcor.cpp:122
const uint8_t kAmcorAuto
Definition: ir_Amcor.h:70
bool getMax(void) const
Is the Maximum Cooling or Heating setting (i.e. Turbo) setting on?
Definition: ir_Amcor.cpp:203
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Amcor.cpp:182
AmcorProtocol _
Definition: ir_Amcor.h:138
const uint8_t kAmcorMaxTemp
Definition: ir_Amcor.h:74
const uint16_t kAmcorDefaultRepeat
Definition: IRremoteESP8266.h:1157
const uint8_t kAmcorFanMax
Definition: ir_Amcor.h:63
Structure to hold a common A/C state.
Definition: IRsend.h:114
void off(void)
Set the internal state to have the power off.
Definition: ir_Amcor.cpp:158
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Amcor.cpp:305
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49