Class for handling detailed Hitachi 15to27-byte/120to216-bit A/C messages.
More...
#include <ir_Hitachi.h>
|
| | IRHitachiAc3 (const uint16_t pin, const bool inverted=false, const bool use_modulation=true) |
| | Class constructor.
|
| |
| void | stateReset (void) |
| | Reset the internal state to a fixed known good state.
|
| |
| void | send (const uint16_t repeat=kHitachiAcDefaultRepeat) |
| |
| int8_t | calibrate (void) |
| | Run the calibration to calculate uSec timing offsets for this platform.
|
| |
| void | begin (void) |
| | Set up hardware to be able to send a message.
|
| |
| uint8_t | getMode (void) |
| |
| uint8_t * | getRaw (void) |
| | Get a PTR to the internal state/code for this protocol.
|
| |
| void | setRaw (const uint8_t new_code[], const uint16_t length=kHitachiAc3StateLength) |
| | Set the internal state from a valid code for this protocol.
|
| |
|
| static bool | hasInvertedStates (const uint8_t state[], const uint16_t length) |
| | Check if every second byte of the state, after the fixed header is inverted to the previous byte.
|
| |
Class for handling detailed Hitachi 15to27-byte/120to216-bit A/C messages.
◆ IRHitachiAc3()
| IRHitachiAc3::IRHitachiAc3 |
( |
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 IRHitachiAc3::begin |
( |
void |
| ) |
|
Set up hardware to be able to send a message.
◆ calibrate()
| int8_t IRHitachiAc3::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.
◆ getMode()
| uint8_t IRHitachiAc3::getMode |
( |
void |
| ) |
|
◆ getRaw()
| uint8_t * IRHitachiAc3::getRaw |
( |
void |
| ) |
|
Get a PTR to the internal state/code for this protocol.
- Returns
- PTR to a code for this protocol based on the current internal state.
◆ hasInvertedStates()
| bool IRHitachiAc3::hasInvertedStates |
( |
const uint8_t |
state[], |
|
|
const uint16_t |
length |
|
) |
| |
|
static |
Check if every second byte of the state, after the fixed header is inverted to the previous byte.
- Parameters
-
| [in] | state | The state array to be checked. |
| [in] | length | The size of the state array. |
- Note
- This is this protocols integrity check.
◆ send()
◆ setInvertedStates()
Invert every second byte of the internal state, after the fixed header.
- Parameters
-
| [in] | length | The size of the state array. |
- Note
- This is this protocols integrity check.
◆ setRaw()
Set the internal state from a valid code for this protocol.
- Parameters
-
| [in] | new_code | A valid code for this protocol. |
| [in] | length | The length of the new_code array. |
◆ stateReset()
| void IRHitachiAc3::stateReset |
( |
void |
| ) |
|
Reset the internal state to a fixed known good state.
- Note
- Reset to auto fan, cooling, 23° Celsius
◆ _irsend
Instance of the IR send class.
◆ remote_state
The state in native code.
The documentation for this class was generated from the following files: