Go to the documentation of this file.
17 #include "IRsend_test.h"
105 #define ARGO_COOL_ON kArgoCoolOn
106 #define ARGO_COOL_OFF kArgoCoolOff
107 #define ARGO_COOL_AUTO kArgoCoolAuto
108 #define ARGO_COOL_HUM kArgoCoolHum
109 #define ARGO_HEAT_ON kArgoHeatOn
110 #define ARGO_HEAT_AUTO kArgoHeatAuto
111 #define ARGO_HEAT_BLINK kArgoHeatBlink
112 #define ARGO_MIN_TEMP kArgoMinTemp
113 #define ARGO_MAX_TEMP kArgoMaxTemp
114 #define ARGO_FAN_AUTO kArgoFanAuto
115 #define ARGO_FAN_3 kArgoFan3
116 #define ARGO_FAN_2 kArgoFan2
117 #define ARGO_FAN_1 kArgoFan1
118 #define ARGO_FLAP_AUTO kArgoFlapAuto
119 #define ARGO_FLAP_1 kArgoFlap1
120 #define ARGO_FLAP_2 kArgoFlap2
121 #define ARGO_FLAP_3 kArgoFlap3
122 #define ARGO_FLAP_4 kArgoFlap4
123 #define ARGO_FLAP_5 kArgoFlap5
124 #define ARGO_FLAP_6 kArgoFlap6
125 #define ARGO_FLAP_FULL kArgoFlapFull
131 explicit IRArgoAC(
const uint16_t pin,
const bool inverted =
false,
132 const bool use_modulation =
true);
149 void setTemp(
const uint8_t degrees);
152 void setFan(
const uint8_t fan);
155 void setFlap(
const uint8_t flap);
158 void setMode(
const uint8_t mode);
175 void setRaw(
const uint8_t state[]);
const uint8_t kArgoFanOffset
Definition: ir_Argo.h:66
void setTime(void)
Set the time for the A/C.
Definition: ir_Argo.cpp:253
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kArgoStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Argo.cpp:74
uint8_t flap_mode
Definition: ir_Argo.h:202
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Argo.cpp:185
IRsend _irsend
instance of the IR send class
Definition: ir_Argo.h:190
const uint8_t kArgoHeatBlink
Definition: ir_Argo.h:59
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:70
const uint8_t kArgoMaxTemp
Definition: ir_Argo.h:93
const uint16_t kArgoDefaultRepeat
Definition: IRremoteESP8266.h:848
void setTemp(const uint8_t degrees)
Set the temperature.
Definition: ir_Argo.cpp:162
void setFlap(const uint8_t flap)
Set the flap position. i.e. Swing.
Definition: ir_Argo.cpp:198
uint8_t getMode(void)
Get the current operation mode setting.
Definition: ir_Argo.cpp:210
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Argo.cpp:279
const uint8_t kArgoPowerBitOffset
Definition: ir_Argo.h:89
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
const uint8_t kArgoTempHighOffset
Definition: ir_Argo.h:63
const uint8_t kArgoFlap2
Definition: ir_Argo.h:97
void stateReset(void)
Reset the internals of the object to a known good state.
Definition: ir_Argo.cpp:101
const uint8_t kArgoFlap4
Definition: ir_Argo.h:99
const uint8_t kArgoTempHighSize
Definition: ir_Argo.h:64
const uint8_t kArgoHeatBit
Definition: ir_Argo.h:44
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Argo.h:140
uint8_t argo[kArgoStateLength]
Definition: ir_Argo.h:197
stdAc::state_t toCommon(void)
Convert the current internal state into its stdAc::state_t equivilant.
Definition: ir_Argo.cpp:360
const uint8_t kArgoFlap3
Definition: ir_Argo.h:98
const uint8_t kArgoMaxBitOffset
Definition: ir_Argo.h:88
bool getiFeel(void)
Get the status of iFeel mode.
Definition: ir_Argo.cpp:249
Class for sending all basic IR protocols.
Definition: IRsend.h:176
static bool validChecksum(const uint8_t state[], const uint16_t length=kArgoStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Argo.cpp:85
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
uint8_t getFlap(void)
Get the flap position. i.e. Swing.
Definition: ir_Argo.cpp:206
bool getMax(void)
Is the Max (i.e. Turbo) setting on?
Definition: ir_Argo.cpp:157
const uint16_t kArgoStateLength
Definition: IRremoteESP8266.h:846
std::string String
Definition: IRremoteESP8266.h:1128
const uint8_t kArgoFan1
Definition: ir_Argo.h:69
uint8_t getRoomTemp(void)
Get the currently stored value for the room temperature setting.
Definition: ir_Argo.cpp:269
bool getPower(void)
Get the power setting from the internal state.
Definition: ir_Argo.cpp:147
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivilant.
Definition: ir_Argo.cpp:336
const uint8_t kArgoOff
Definition: ir_Argo.h:55
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Argo.cpp:316
const uint8_t kArgoFlapFull
Definition: ir_Argo.h:102
const uint8_t kArgoRoomTempHighSize
Definition: ir_Argo.h:79
const uint8_t kArgoDry
Definition: ir_Argo.h:53
const uint8_t kArgoAuto
Definition: ir_Argo.h:54
void setRoomTemp(const uint8_t degrees)
Set the value for the current room temperature.
Definition: ir_Argo.cpp:259
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Argo.cpp:298
const uint8_t kArgoTempLowOffset
Definition: ir_Argo.h:46
void off(void)
Set the internal state to have the power off.
Definition: ir_Argo.cpp:137
uint8_t getFan(void)
Get the current fan speed setting.
Definition: ir_Argo.cpp:191
void setPower(const bool on)
Set the internal state to have the desired power.
Definition: ir_Argo.cpp:141
const uint8_t kArgoRoomTempLowOffset
Definition: ir_Argo.h:73
const uint8_t kArgoFlap1
Definition: ir_Argo.h:96
const uint8_t kArgoModeOffset
Definition: ir_Argo.h:50
uint8_t * getRaw(void)
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
Definition: ir_Argo.cpp:122
const uint8_t kArgoTempLowSize
Definition: ir_Argo.h:47
uint8_t getTemp(void)
Get the current temperature setting.
Definition: ir_Argo.cpp:176
const uint8_t kArgoRoomTempLowSize
Definition: ir_Argo.h:74
uint8_t heat_mode
Definition: ir_Argo.h:203
const uint8_t kArgoMinTemp
Definition: ir_Argo.h:92
void on(void)
Set the internal state to have the power on.
Definition: ir_Argo.cpp:134
void setNight(const bool on)
Turn on/off the Night mode. i.e. Sleep.
Definition: ir_Argo.cpp:233
bool getNight(void)
Get the status of Night mode. i.e. Sleep.
Definition: ir_Argo.cpp:239
const uint8_t kArgoFan2
Definition: ir_Argo.h:70
const uint8_t kArgoIFeelBitOffset
Definition: ir_Argo.h:90
const uint8_t kArgoCool
Definition: ir_Argo.h:52
void send(const uint16_t repeat=kArgoDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Argo.cpp:65
const uint8_t kArgoHeatAuto
Definition: ir_Argo.h:57
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivilant.
Definition: ir_Argo.cpp:349
const uint8_t kArgoHeat
Definition: ir_Argo.h:56
void setRaw(const uint8_t state[])
Set the raw state of the object.
Definition: ir_Argo.cpp:129
const uint8_t kArgoFlap5
Definition: ir_Argo.h:100
IRArgoAC(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Argo.cpp:55
const uint8_t kArgoTempDelta
Definition: ir_Argo.h:81
const uint8_t kArgoRoomTempHighOffset
Definition: ir_Argo.h:78
void checksum(void)
Update the checksum for the internal state.
Definition: ir_Argo.cpp:91
const uint8_t kArgoFlap6
Definition: ir_Argo.h:101
const uint8_t kArgoModeSize
Definition: ir_Argo.h:51
uint8_t cool_mode
Definition: ir_Argo.h:204
void setiFeel(const bool on)
Turn on/off the iFeel mode.
Definition: ir_Argo.cpp:243
void setMax(const bool on)
Control the current Max setting. (i.e. Turbo)
Definition: ir_Argo.cpp:151
String toString()
Convert the current internal state into a human readable string.
Definition: ir_Argo.cpp:386
const uint8_t kArgoFlapAuto
Definition: ir_Argo.h:95
const uint8_t kArgoFanSize
Definition: ir_Argo.h:67
Structure to hold a common A/C state.
Definition: IRsend.h:97
const uint8_t kArgoFan3
Definition: ir_Argo.h:71
Class for handling detailed Argo A/C messages.
Definition: ir_Argo.h:129
const uint8_t kArgoNightBitOffset
Definition: ir_Argo.h:87
const uint8_t kArgoFanAuto
Definition: ir_Argo.h:68
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Argo.cpp:60
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition: ir_Argo.cpp:216
const uint8_t kArgoMaxRoomTemp
Definition: ir_Argo.h:82
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46