Showing content from https://crankyoldgit.github.io/IRremoteESP8266/doxygen/html/classIRMirageAc.html below:
IRremoteESP8266: IRMirageAc Class Reference
Class for handling detailed Mirage 120-bit A/C messages. More...
#include <ir_Mirage.h>
Collaboration diagram for IRMirageAc:
Private Member Functions void checksum (void) Calculate and set the checksum values for the internal state. More...
Detailed Description
Class for handling detailed Mirage 120-bit A/C messages.
-
Note
-
Inspired and derived from the work done at: https://github.com/r45635/HVAC-IR-Control
-
Warning
-
Consider this very alpha code. Seems to work, but not validated.
Constructor & Destructor Documentation ◆ IRMirageAc() IRMirageAc::IRMirageAc ( 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?
Member Function Documentation ◆ begin() void IRMirageAc::begin ( void )
Set up hardware to be able to send a message.
◆ calculateChecksum() uint8_t IRMirageAc::calculateChecksum ( const uint8_t * data ) static
Calculate the checksum for a given state.
-
Parameters
-
[in] data The value to calc the checksum of.
-
Returns
-
The calculated checksum value.
◆ calibrate() int8_t IRMirageAc::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.
◆ checksum() void IRMirageAc::checksum ( void ) private
Calculate and set the checksum values for the internal state.
◆ convertFan()
Convert a stdAc::fanspeed_t enum into it's native speed.
-
Parameters
-
[in] speed The enum to be converted. [in] model The model type to use to influence the conversion.
-
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.
◆ convertSwingV()
Convert a stdAc::swingv_t enum into it's native setting.
-
Parameters
-
[in] position The enum to be converted.
-
Returns
-
The native equivalent of the enum.
◆ fromCommon()
Convert & set a stdAc::state_t to its equivalent internal settings.
-
Parameters
-
◆ getCleanToggle() bool IRMirageAc::getCleanToggle ( void ) const
Get the Clean Toggle setting of the A/C.
-
Returns
-
on true, the setting is on. false, the setting is off.
◆ getClock() uint32_t IRMirageAc::getClock ( void ) const
Get the clock time of the A/C unit.
-
Returns
-
Nr. of seconds past midnight.
◆ getFan() uint8_t IRMirageAc::getFan ( void ) const
Get the current fan speed setting.
-
Returns
-
The current fan speed/mode.
◆ getFilter() bool IRMirageAc::getFilter ( void ) const
Get the Filter setting of the A/C.
-
Returns
-
on true, the setting is on. false, the setting is off.
◆ getIFeel() bool IRMirageAc::getIFeel ( void ) const
Get the IFeel setting of the A/C.
-
Returns
-
on true, the setting is on. false, the setting is off.
◆ getLight() bool IRMirageAc::getLight ( void ) const
Get the value of the current Light/Display setting.
-
Returns
-
true, the setting is on. false, the setting is off.
-
Note
-
Light is a toggle on the KKG29AC1 model.
◆ getMode() uint8_t IRMirageAc::getMode ( void ) const
Get the operating mode setting of the A/C.
-
Returns
-
The current operating mode setting.
◆ getModel() [1/2]
Get the model code of the interal message state.
-
Parameters
-
[in] useRaw If set, we try to get the model info from just the state.
-
Returns
-
The model code.
◆ getModel() [2/2]
Guess the Mirage remote model from the supplied state code.
-
Parameters
-
[in] state A valid state code for this protocol.
-
Returns
-
The model code.
-
Note
-
This result isn't perfect. Both protocols can look the same but have wildly different settings.
◆ getOffTimer() uint16_t IRMirageAc::getOffTimer ( void ) const
Get the number of minutes the Off Timer is currently set for.
-
Returns
-
Nr. of Minutes the timer is set for. 0, is the timer is not in use.
◆ getOnTimer() uint16_t IRMirageAc::getOnTimer ( void ) const
Get the number of minutes the On Timer is currently set for.
-
Returns
-
Nr. of Minutes the timer is set for. 0, is the timer is not in use.
◆ getPower() bool IRMirageAc::getPower ( void ) const
Get the value of the current power setting.
-
Returns
-
true, the setting is on. false, the setting is off.
◆ getQuiet() bool IRMirageAc::getQuiet ( void ) const
Get the Quiet setting of the A/C.
-
Returns
-
on true, the setting is on. false, the setting is off.
◆ getRaw() uint8_t * IRMirageAc::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.
◆ getSensorTemp() uint16_t IRMirageAc::getSensorTemp ( void ) const
Get the Sensor Temp setting of the A/C's remote.
-
Returns
-
The current setting for the sensor temp. in degrees celsius.
◆ getSleep() bool IRMirageAc::getSleep ( void ) const
Get the value of the current Sleep setting.
-
Returns
-
true, the setting is on. false, the setting is off.
◆ getSwingH() bool IRMirageAc::getSwingH ( void ) const
Get the Horizontal Swing setting of the A/C.
-
Returns
-
on true, the setting is on. false, the setting is off.
◆ getSwingV() uint8_t IRMirageAc::getSwingV ( void ) const
Get the Vertical Swing setting/position of the A/C.
-
Returns
-
The desired Vertical Swing setting/position.
◆ getTemp() uint8_t IRMirageAc::getTemp ( void ) const
Get the current temperature setting.
-
Returns
-
The current setting for temp. in degrees celsius.
◆ getTurbo() bool IRMirageAc::getTurbo ( void ) const
Get the value of the current Turbo setting.
-
Returns
-
true, the setting is on. false, the setting is off.
◆ off() void IRMirageAc::off ( void )
Set the requested power state of the A/C to off.
◆ on() void IRMirageAc::on ( void )
Set the requested power state of the A/C to on.
◆ send()
Send the current internal state as an IR message.
-
Parameters
-
[in] repeat Nr. of times the message will be repeated.
◆ setCleanToggle() void IRMirageAc::setCleanToggle ( const bool on )
Set the CleanToggle setting of the A/C.
-
Parameters
-
[in] on true, the setting is on. false, the setting is off.
◆ setClock() void IRMirageAc::setClock ( const uint32_t nr_of_seconds )
Set the clock time on the A/C unit.
-
Parameters
-
[in] nr_of_seconds Nr. of seconds past midnight.
◆ setFan() void IRMirageAc::setFan ( const uint8_t speed )
Set the speed of the fan.
-
Parameters
-
[in] speed The desired setting.
◆ setFilter() void IRMirageAc::setFilter ( const bool on )
Set the Filter setting of the A/C.
-
Parameters
-
[in] on true, the setting is on. false, the setting is off.
◆ setIFeel() void IRMirageAc::setIFeel ( const bool on )
Set the IFeel setting of the A/C.
-
Parameters
-
[in] on true, the setting is on. false, the setting is off.
◆ setLight() void IRMirageAc::setLight ( const bool on )
Change the Light/Display setting.
-
Parameters
-
[in] on true, the setting is on. false, the setting is off.
-
Note
-
Light is a toggle on the KKG29AC1 model.
◆ setMode() void IRMirageAc::setMode ( const uint8_t mode )
Set the operating mode of the A/C.
-
Parameters
-
[in] mode The desired operating mode.
◆ setModel()
Set the model code of the interal message state.
-
Parameters
-
[in] model The desired model to use for the settings.
◆ setOffTimer() void IRMirageAc::setOffTimer ( const uint16_t nr_of_mins )
Set the number of minutes for the Off Timer.
-
Parameters
-
[in] nr_of_mins How long to set the timer for. 0 disables the timer.
◆ setOnTimer() void IRMirageAc::setOnTimer ( const uint16_t nr_of_mins )
Set the number of minutes for the On Timer.
-
Parameters
-
[in] nr_of_mins How long to set the timer for. 0 disables the timer.
◆ setPower() void IRMirageAc::setPower ( const bool on )
Change the power setting.
-
Parameters
-
[in] on true, the setting is on. false, the setting is off.
◆ setQuiet() void IRMirageAc::setQuiet ( const bool on )
Set the Quiet setting of the A/C.
-
Parameters
-
[in] on true, the setting is on. false, the setting is off.
◆ setRaw() void IRMirageAc::setRaw ( const uint8_t * data )
Set the internal state from a valid code for this protocol.
-
Parameters
-
[in] data A valid code for this protocol.
◆ setSensorTemp() void IRMirageAc::setSensorTemp ( const uint8_t degrees )
Set the Sensor Temp setting of the A/C's remote.
-
Parameters
-
[in] degrees The desired sensor temp. in degrees celsius.
◆ setSleep() void IRMirageAc::setSleep ( const bool on )
Change the Sleep setting.
-
Parameters
-
[in] on true, the setting is on. false, the setting is off.
◆ setSwingH() void IRMirageAc::setSwingH ( const bool on )
Set the Horizontal Swing setting of the A/C.
-
Parameters
-
[in] on true, the setting is on. false, the setting is off.
◆ setSwingV() void IRMirageAc::setSwingV ( const uint8_t position )
Set the Vertical Swing setting/position of the A/C.
-
Parameters
-
[in] position The desired swing setting.
◆ setTemp() void IRMirageAc::setTemp ( const uint8_t degrees )
Set the temperature.
-
Parameters
-
[in] degrees The temperature in degrees celsius.
◆ setTurbo() void IRMirageAc::setTurbo ( const bool on )
Change the Turbo setting.
-
Parameters
-
[in] on true, the setting is on. false, the setting is off.
◆ stateReset() void IRMirageAc::stateReset ( void )
Reset the state of the remote to a known good state/sequence.
◆ 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. [in] model The model type to use to influence the conversion.
-
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.
◆ toCommonSwingV()
Convert a native vertical swing postion to it's common equivalent.
-
Parameters
-
[in] pos A native position to convert.
-
Returns
-
The common vertical swing position.
◆ toString() String IRMirageAc::toString ( void ) const
Convert the internal state into a human readable string.
-
Returns
-
A string containing the settings in human-readable form.
◆ validChecksum() bool IRMirageAc::validChecksum ( const uint8_t * data ) static
Verify the checksum is valid for a given state.
-
Parameters
-
[in] data The array to verify the checksum of.
-
Returns
-
true, if the state has a valid checksum. Otherwise, false.
Member Data Documentation ◆ _ ◆ _irsend
Instance of the IR send class.
◆ _model
The documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4