Go to the documentation of this file.
14 #define __STDC_LIMIT_MACROS
27 #include "IRsend_test.h"
91 const uint8_t
kBosch144Off[] = {0xB2, 0x4D, 0x7B, 0x84, 0xE0, 0x1F,
92 0xB2, 0x4D, 0x7B, 0x84, 0xE0, 0x1F};
96 0xB2, 0x4D, 0x1F, 0xE0, 0xC8, 0x37,
97 0xB2, 0x4D, 0x1F, 0xE0, 0xC8, 0x37,
98 0xD5, 0x65, 0x00, 0x00, 0x00, 0x3A};
142 explicit IRBosch144AC(
const uint16_t pin,
const bool inverted =
false,
143 const bool use_modulation =
true);
146 void send(
const uint16_t repeat = 0);
152 #endif // SEND_BOSCH144
156 void setTemp(
const uint8_t temp);
158 void setFan(
const uint16_t speed);
159 uint16_t
getFan(
void)
const;
160 void setMode(
const uint8_t mode);
165 void setRaw(
const uint8_t new_code[],
193 #endif // IR_BOSCH_H_
Bosch144Protocol _
The state of the IR remote in IR code form.
Definition: ir_Bosch.h:182
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Bosch.h:151
static stdAc::fanspeed_t toCommonFanSpeed(const uint16_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Bosch.cpp:211
uint16_t getFan(void) const
Definition: ir_Bosch.cpp:127
const uint16_t kBoschHdrSpace
Definition: ir_Bosch.h:33
uint8_t ChecksumS3
Definition: ir_Bosch.h:133
uint8_t ModeS1
Definition: ir_Bosch.h:109
const uint16_t kBosch144StateLength
Definition: IRremoteESP8266.h:1168
uint8_t getTempRaw(void) const
const uint16_t kBoschFooterSpace
Definition: ir_Bosch.h:36
const uint16_t kBosch144FanAuto0
Definition: ir_Bosch.h:66
uint8_t Quiet
Definition: ir_Bosch.h:128
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
const uint8_t kBosch144TempMin
Definition: ir_Bosch.h:69
uint8_t InnvertS2_3
Definition: ir_Bosch.h:121
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Bosch.cpp:103
uint8_t TempS3
Definition: ir_Bosch.h:130
void setCheckSumS3()
Definition: ir_Bosch.cpp:274
uint8_t * getRaw(void)
Get a copy of the internal state as a valid code for this protocol.
Definition: ir_Bosch.cpp:68
const uint16_t kBosch144NrOfSections
Definition: ir_Bosch.h:38
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Bosch.cpp:198
bool getPower(void) const
Definition: ir_Bosch.cpp:92
const uint16_t kBosch144FanAuto
Definition: ir_Bosch.h:65
void send(const uint16_t repeat=0)
Send the current internal state as an IR message.
Definition: ir_Bosch.cpp:57
const uint16_t kBosch144Fan40
Definition: ir_Bosch.h:61
String addModeToString(const uint8_t mode, const uint8_t automatic, const uint8_t cool, const uint8_t heat, const uint8_t dry, const uint8_t fan)
Create a String of human output for the given operating mode. e.g. "Mode: 1 (Cool)".
Definition: IRutils.cpp:770
Class for sending all basic IR protocols.
Definition: IRsend.h:237
const uint8_t kBosch144Off[]
Definition: ir_Bosch.h:91
uint8_t ModeS3
Definition: ir_Bosch.h:124
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
const uint8_t kBosch144TempMax
Definition: ir_Bosch.h:70
uint8_t TempS2
Definition: ir_Bosch.h:120
std::string String
Definition: IRremoteESP8266.h:1521
void setQuiet(const bool on)
Set the Quiet mode of the A/C.
Definition: ir_Bosch.cpp:148
const uint16_t kBosch144Fan100
Definition: ir_Bosch.h:64
const uint16_t kBosch144BytesPerSection
Definition: ir_Bosch.h:39
const uint16_t kBoschHdrMark
Definition: ir_Bosch.h:31
void begin()
Set up hardware to be able to send a message.
Definition: ir_Bosch.cpp:52
IRBosch144AC(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Bosch.cpp:41
bool getQuiet(void) const
Get the Quiet mode of the A/C.
Definition: ir_Bosch.cpp:155
void setRaw(const uint8_t new_code[], const uint16_t length=kBosch144StateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Bosch.cpp:77
uint8_t FanS3
Definition: ir_Bosch.h:125
const uint16_t kBosch144Fan80
Definition: ir_Bosch.h:63
String addTempToString(const uint16_t degrees, const bool celsius, const bool precomma, const bool isSensorTemp)
Create a String of human output for a given temperature. e.g. "Temp: 25C".
Definition: IRutils.cpp:733
const uint8_t kBosch144DefaultState[kBosch144StateLength]
Definition: ir_Bosch.h:95
uint8_t getTemp(void) const
Definition: ir_Bosch.cpp:109
const uint16_t kBoschOneSpace
Definition: ir_Bosch.h:34
uint8_t InnvertS1_2
Definition: ir_Bosch.h:107
const uint8_t kBosch144Auto
Definition: ir_Bosch.h:54
const uint8_t kBosch144Fan
Definition: ir_Bosch.h:56
const uint16_t kBoschBitMark
Definition: ir_Bosch.h:32
uint8_t ModeS2
Definition: ir_Bosch.h:119
uint8_t InnvertS1_1
Definition: ir_Bosch.h:104
uint8_t FanS1
Definition: ir_Bosch.h:106
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Bosch.cpp:224
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Bosch.cpp:46
IRsend _irsend
Instance of the IR send class.
Definition: ir_Bosch.h:176
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition: ir_Bosch.cpp:133
const uint16_t kBosch144Fan20
Definition: ir_Bosch.h:60
void setFan(const uint16_t speed)
Set the speed of the fan.
Definition: ir_Bosch.cpp:122
const uint8_t kBosch144TempMap[kBosch144TempRange]
Definition: ir_Bosch.h:72
const uint8_t kBosch144Dry
Definition: ir_Bosch.h:53
bool powerFlag
Definition: ir_Bosch.h:185
uint8_t InnvertS1_3
Definition: ir_Bosch.h:111
String addBoolToString(const bool value, const String label, const bool precomma)
Create a String with a colon separated flag suitable for Humans. e.g. "Power: On".
Definition: IRutils.cpp:553
static uint16_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Bosch.cpp:178
String addFanToString(const uint8_t speed, const uint8_t high, const uint8_t low, const uint8_t automatic, const uint8_t quiet, const uint8_t medium, const uint8_t maximum, const uint8_t medium_high)
Create a String of human output for the given fan speed. e.g. "Fan: 0 (Auto)".
Definition: IRutils.cpp:837
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Bosch.cpp:160
uint8_t getMode(void) const
Definition: ir_Bosch.cpp:142
uint8_t raw[kBosch144StateLength]
The state in IR code form.
Definition: ir_Bosch.h:101
const uint16_t kBosch144Fan60
Definition: ir_Bosch.h:62
uint8_t InnvertS2_2
Definition: ir_Bosch.h:117
const uint8_t kBosch144TempRange
Definition: ir_Bosch.h:71
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Bosch.cpp:250
const uint8_t kBosch144Cool
Definition: ir_Bosch.h:52
void setInvertBytes()
Definition: ir_Bosch.cpp:268
uint8_t TempS1
Definition: ir_Bosch.h:110
void setTempRaw(const uint8_t code)
Definition: ir_Bosch.cpp:96
const uint16_t kBoschZeroSpace
Definition: ir_Bosch.h:35
const uint16_t kBoschFreq
Definition: ir_Bosch.h:37
uint8_t FanS2
Definition: ir_Bosch.h:116
uint8_t InnvertS2_1
Definition: ir_Bosch.h:114
Structure to hold a common A/C state.
Definition: IRsend.h:114
Definition: ir_Bosch.h:100
const uint8_t kBosch144Heat
Definition: ir_Bosch.h:55
void setPower(const bool state)
Definition: ir_Bosch.cpp:88
Class for handling detailed Bosch144 A/C messages.
Definition: ir_Bosch.h:140
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49