Class for handling detailed Transcold A/C messages.  
 More...
#include <ir_Transcold.h>
|  | 
| bool | isSpecialState (void) const | 
|  | Is the current state is a special state?  More... 
 | 
|  | 
| bool | handleSpecialState (const uint32_t data) | 
|  | Adjust any internal settings based on the type of special state we are supplied. Does nothing if it isn't a special state.  More... 
 | 
|  | 
Class for handling detailed Transcold A/C messages. 
◆ IRTranscoldAc()
  
  | 
        
          | IRTranscoldAc::IRTranscoldAc | ( | 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 IRTranscoldAc::begin | ( | void |  | ) |  | 
      
 
Set up hardware to be able to send a message. 
 
 
◆ calibrate()
  
  | 
        
          | int8_t IRTranscoldAc::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 standard A/C mode into its native mode. 
- Parameters
- 
  
  
- Returns
- The corresponding native mode. 
 
 
◆ getFan()
      
        
          | uint8_t IRTranscoldAc::getFan | ( | void |  | ) | const | 
      
 
Get the current fan speed setting. 
- Returns
- The current fan speed. 
 
 
◆ getMode()
      
        
          | uint8_t IRTranscoldAc::getMode | ( | void |  | ) | const | 
      
 
Get the operating mode setting of the A/C. 
- Returns
- The current operating mode setting. 
 
 
◆ getPower()
      
        
          | bool IRTranscoldAc::getPower | ( | void |  | ) | const | 
      
 
Get the value of the current power setting. 
- Returns
- true, the setting is on. false, the setting is off. 
 
 
◆ getRaw()
      
        
          | uint32_t IRTranscoldAc::getRaw | ( | void |  | ) | const | 
      
 
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. 
 
 
◆ getSwing()
      
        
          | bool IRTranscoldAc::getSwing | ( | void |  | ) | const | 
      
 
Get the Swing setting of the A/C. 
- Returns
- true, the setting is on. false, the setting is off. 
 
 
◆ getTemp()
      
        
          | uint8_t IRTranscoldAc::getTemp | ( | void |  | ) | const | 
      
 
Get the current temperature setting. 
- Returns
- The current setting for temp. in degrees celsius. 
 
 
◆ handleSpecialState()
  
  | 
        
          | bool IRTranscoldAc::handleSpecialState | ( | const uint32_t | data | ) |  |  | private | 
 
Adjust any internal settings based on the type of special state we are supplied. Does nothing if it isn't a special state. 
- Parameters
- 
  
    | [in] | data | The state we need to act upon. |  
 
- Note
- Special state means commands that are not affecting Temperature/Mode/Fan 
- Returns
- true, if it is a special state. false if it isn't. 
 
 
◆ isSpecialState()
  
  | 
        
          | bool IRTranscoldAc::isSpecialState | ( | void |  | ) | const |  | private | 
 
Is the current state is a special state? 
- Returns
- true, if it is. false if it isn't. 
 
 
◆ off()
      
        
          | void IRTranscoldAc::off | ( | void |  | ) |  | 
      
 
Change the power setting to Off. 
 
 
◆ on()
      
        
          | void IRTranscoldAc::on | ( | void |  | ) |  | 
      
 
Change the power setting to On. 
 
 
◆ send()
Send the current internal state as an IR message. 
- Parameters
- 
  
    | [in] | repeat | Nr. of times the message will be repeated. |  
 
 
 
◆ setFan()
      
        
          | void IRTranscoldAc::setFan | ( | const uint8_t | speed, | 
        
          |  |  | const bool | modecheck = true | 
        
          |  | ) |  |  | 
      
 
Set the speed of the fan. 
- Parameters
- 
  
    | [in] | speed | The desired setting. |  | [in] | modecheck | Do we enforce any mode limitations before setting? |  
 
 
 
◆ setMode()
      
        
          | void IRTranscoldAc::setMode | ( | const uint8_t | mode | ) |  | 
      
 
Set the operating mode of the A/C. 
- Parameters
- 
  
    | [in] | mode | The desired operating mode. |  
 
 
 
◆ setPower()
      
        
          | void IRTranscoldAc::setPower | ( | const bool | on | ) |  | 
      
 
Change the power setting. 
- Parameters
- 
  
    | [in] | on | true, the setting is on. false, the setting is off. |  
 
 
 
◆ setRaw()
      
        
          | void IRTranscoldAc::setRaw | ( | const uint32_t | new_code | ) |  | 
      
 
Set the internal state from a valid code for this protocol. 
- Parameters
- 
  
    | [in] | new_code | A valid code for this protocol. |  
 
 
 
◆ setSwing()
      
        
          | void IRTranscoldAc::setSwing | ( | void |  | ) |  | 
      
 
Toggle the Swing mode of the A/C. 
 
 
◆ setTemp()
      
        
          | void IRTranscoldAc::setTemp | ( | const uint8_t | desired | ) |  | 
      
 
Set the temperature. 
- Parameters
- 
  
    | [in] | desired | The temperature in degrees celsius. |  
 
 
 
◆ stateReset()
      
        
          | void IRTranscoldAc::stateReset | ( | void |  | ) |  | 
      
 
Reset the internal state to a fixed known good state. 
 
 
◆ toCommon()
Convert the A/C state to it's common stdAc::state_t equivalent. 
- Parameters
- 
  
    | [in] | prev | Ptr to the previous state if required. |  
 
- Returns
- A stdAc::state_t state. 
 
 
◆ 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 to it's common stdAc::opmode_t equivalent. 
- Parameters
- 
  
    | [in] | mode | A native operation mode to be converted. |  
 
- Returns
- The corresponding common stdAc::opmode_t mode. 
 
 
◆ toString()
      
        
          | String IRTranscoldAc::toString | ( | void |  | ) | const | 
      
 
Convert the internal state into a human readable string. 
- Returns
- The current internal state expressed as a human readable String. 
 
 
◆ _irsend
Instance of the IR send class. 
 
 
◆ special_state
  
  | 
        
          | uint32_t IRTranscoldAc::special_state |  | private | 
 
 
◆ swingFlag
  
  | 
        
          | bool IRTranscoldAc::swingFlag |  | private | 
 
 
◆ swingHFlag
  
  | 
        
          | bool IRTranscoldAc::swingHFlag |  | private | 
 
 
◆ swingVFlag
  
  | 
        
          | bool IRTranscoldAc::swingVFlag |  | private | 
 
 
The documentation for this class was generated from the following files: