IRremoteESP8266: IRBosch144AC Class Reference (original) (raw)
Class for handling detailed Bosch144 A/C messages. More...
#include <[ir_Bosch.h](ir%5F%5FBosch%5F8h%5Fsource.html)>
Public Member Functions | |
---|---|
IRBosch144AC (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) | |
Class constructor. More... | |
void | stateReset (void) |
Reset the internal state to a fixed known good state. More... | |
void | send (const uint16_t repeat=0) |
Send the current internal state as an IR message. More... | |
int8_t | calibrate (void) |
Run the calibration to calculate uSec timing offsets for this platform. More... | |
void | begin () |
Set up hardware to be able to send a message. More... | |
void | setPower (const bool state) |
bool | getPower (void) const |
void | setTemp (const uint8_t temp) |
Set the temperature. More... | |
uint8_t | getTemp (void) const |
void | setFan (const uint16_t speed) |
Set the speed of the fan. More... | |
uint16_t | getFan (void) const |
void | setMode (const uint8_t mode) |
Set the desired operation mode. More... | |
uint8_t | getMode (void) const |
void | setQuiet (const bool on) |
Set the Quiet mode of the A/C. More... | |
bool | getQuiet (void) const |
Get the Quiet mode of the A/C. More... | |
uint8_t * | getRaw (void) |
Get a copy of the internal state as a valid code for this protocol. More... | |
void | setRaw (const uint8_t new_code[], const uint16_t length=kBosch144StateLength) |
Set the internal state from a valid code for this protocol. More... | |
stdAc::state_t | toCommon (void) const |
Convert the current internal state into its stdAc::state_t equivalent. More... | |
String | toString (void) const |
Convert the current internal state into a human readable string. More... | |
Static Public Member Functions | |
---|---|
static uint8_t | convertMode (const stdAc::opmode_t mode) |
Convert a stdAc::opmode_t enum into its native mode. More... | |
static uint16_t | convertFan (const stdAc::fanspeed_t speed) |
Convert a stdAc::fanspeed_t enum into it's native speed. More... | |
static stdAc::opmode_t | toCommonMode (const uint8_t mode) |
Convert a native mode into its stdAc equivalent. More... | |
static stdAc::fanspeed_t | toCommonFanSpeed (const uint16_t speed) |
Convert a native fan speed into its stdAc equivalent. More... | |
Private Member Functions | |
---|---|
void | setInvertBytes () |
void | setCheckSumS3 () |
void | setTempRaw (const uint8_t code) |
uint8_t | getTempRaw (void) const |
Private Attributes | |
---|---|
IRsend | _irsend |
Instance of the IR send class. More... | |
Bosch144Protocol | _ |
The state of the IR remote in IR code form. More... | |
bool | powerFlag |
Class for handling detailed Bosch144 A/C messages.
IRBosch144AC::IRBosch144AC ( const uint16_t pin, const bool inverted = false, const bool use_modulation = true ) | explicit |
---|
Class constructor.
Parameters
[in] | pin | GPIO to be used when sending. |
---|---|---|
[in] | inverted | Is the output signal to be inverted? |
[in] | use_modulation | Is frequency modulation to be used? |
◆ begin()
void IRBosch144AC::begin | ( | ) |
---|
Set up hardware to be able to send a message.
◆ calibrate()
int8_t IRBosch144AC::calibrate ( void ) | inline |
---|
Run the calibration to calculate uSec timing offsets for this platform.
Returns
The uSec timing offset needed per modulation of the IR Led.
Note
This will produce a 65ms IR signal pulse at 38kHz. Only ever needs to be run once per object instantiation, if at all.
◆ convertFan()
Convert a stdAc::fanspeed_t enum into it's native speed.
Parameters
[in] | speed | The enum to be converted. |
---|
Returns
The native equivalent of the enum.
◆ convertMode()
Convert a stdAc::opmode_t enum into its native mode.
Parameters
[in] | mode | The enum to be converted. |
---|
Returns
The native equivalent of the enum.
◆ getFan()
uint16_t IRBosch144AC::getFan | ( | void | ) | const |
---|
◆ getMode()
uint8_t IRBosch144AC::getMode | ( | void | ) | const |
---|
◆ getPower()
bool IRBosch144AC::getPower | ( | void | ) | const |
---|
◆ getQuiet()
bool IRBosch144AC::getQuiet | ( | void | ) | const |
---|
Get the Quiet mode of the A/C.
Returns
true, the setting is on. false, the setting is off.
◆ getRaw()
unsigned char * IRBosch144AC::getRaw | ( | void | ) |
---|
Get a copy of the internal state as a valid code for this protocol.
Returns
A valid code for this protocol based on the current internal state.
◆ getTemp()
uint8_t IRBosch144AC::getTemp | ( | void | ) | const |
---|
◆ getTempRaw()
uint8_t IRBosch144AC::getTempRaw ( void ) const | private |
---|
◆ send()
void IRBosch144AC::send | ( | const uint16_t | repeat = 0 | ) |
---|
Send the current internal state as an IR message.
Parameters
[in] | repeat | Nr. of times the message will be repeated. |
---|
◆ setCheckSumS3()
void IRBosch144AC::setCheckSumS3 ( ) | private |
---|
◆ setFan()
void IRBosch144AC::setFan | ( | const uint16_t | speed | ) |
---|
Set the speed of the fan.
Parameters
[in] | speed | The desired setting. |
---|
◆ setInvertBytes()
void IRBosch144AC::setInvertBytes ( ) | private |
---|
◆ setMode()
void IRBosch144AC::setMode | ( | const uint8_t | mode | ) |
---|
Set the desired operation mode.
Parameters
[in] | mode | The desired operation mode. |
---|
◆ setPower()
void IRBosch144AC::setPower | ( | const bool | state | ) |
---|
◆ setQuiet()
void IRBosch144AC::setQuiet | ( | const bool | on | ) |
---|
Set the Quiet mode of the A/C.
Parameters
[in] | on | true, the setting is on. false, the setting is off. |
---|
◆ setRaw()
void IRBosch144AC::setRaw | ( | const uint8_t | _new_code_[], |
---|---|---|---|
const uint16_t | length = kBosch144StateLength | ||
) |
Set the internal state from a valid code for this protocol.
Parameters
[in] | new_code | A valid code for this protocol. |
---|---|---|
[in] | length | Size of the array being passed in in bytes. |
◆ setTemp()
void IRBosch144AC::setTemp | ( | const uint8_t | degrees | ) |
---|
Set the temperature.
Parameters
[in] | degrees | The temperature in degrees celsius. |
---|
◆ setTempRaw()
void IRBosch144AC::setTempRaw ( const uint8_t code) | private |
---|
◆ stateReset()
void IRBosch144AC::stateReset | ( | void | ) |
---|
Reset the internal state to a fixed known good state.
◆ toCommon()
Convert the current internal state into its stdAc::state_t equivalent.
Returns
The stdAc equivalent of the native settings.
◆ toCommonFanSpeed()
Convert a native fan speed into its stdAc equivalent.
Parameters
[in] | speed | The native setting to be converted. |
---|
Returns
The stdAc equivalent of the native setting.
◆ toCommonMode()
Convert a native mode into its stdAc equivalent.
Parameters
[in] | mode | The native setting to be converted. |
---|
Returns
The stdAc equivalent of the native setting.
◆ toString()
String IRBosch144AC::toString | ( | void | ) | const |
---|
Convert the current internal state into a human readable string.
Returns
A human readable string.
◆ _
The state of the IR remote in IR code form.
◆ _irsend
Instance of the IR send class.
◆ powerFlag
bool IRBosch144AC::powerFlag | private |
---|
The documentation for this class was generated from the following files:
- src/ir_Bosch.h
- src/ir_Bosch.cpp