IRremoteESP8266
Public Member Functions | Private Member Functions | Private Attributes | List of all members
IRrecv Class Reference

Class for receiving IR messages. More...

#include <IRrecv.h>

Collaboration diagram for IRrecv:
Collaboration graph
[legend]

Public Member Functions

 IRrecv (const uint16_t recvpin, const uint16_t bufsize=kRawBuf, const uint8_t timeout=kTimeoutMs, const bool save_buffer=false, const uint8_t timer_num=kDefaultESP32Timer)
 Class constructor Args: More...
 
 IRrecv (const uint16_t recvpin, const uint16_t bufsize=kRawBuf, const uint8_t timeout=kTimeoutMs, const bool save_buffer=false)
 
 ~IRrecv (void)
 Class destructor Cleans up after the object is no longer needed. e.g. Frees up all memory used by the various buffers, and disables any timers or interrupts used. More...
 
void setTolerance (const uint8_t percent=kTolerance)
 Set the base tolerance percentage for matching incoming IR messages. More...
 
uint8_t getTolerance (void)
 Get the base tolerance percentage for matching incoming IR messages. More...
 
bool decode (decode_results *results, irparams_t *save=NULL, uint8_t max_skip=0, uint16_t noise_floor=0)
 Decodes the received IR message. If the interrupt state is saved, we will immediately resume waiting for the next IR message to avoid missing messages. More...
 
void enableIRIn (const bool pullup=false)
 Set up and (re)start the IR capture mechanism. More...
 
void disableIRIn (void)
 Stop collection of any received IR data. Disable any timers and interrupts. More...
 
void resume (void)
 Resume collection of received IR data. More...
 
uint16_t getBufSize (void)
 Obtain the maximum number of entries possible in the capture buffer. i.e. It's size. More...
 
void setUnknownThreshold (const uint16_t length)
 Set the minimum length we will consider for reporting UNKNOWN message types. More...
 
bool match (const uint32_t measured, const uint32_t desired, const uint8_t tolerance=kUseDefTol, const uint16_t delta=0)
 Check if we match a pulse(measured) with the desired within +/-tolerance percent and/or +/- a fixed delta range. More...
 
bool matchMark (const uint32_t measured, const uint32_t desired, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess)
 Check if we match a mark signal(measured) with the desired within +/-tolerance percent, after an expected is excess is added. More...
 
bool matchSpace (const uint32_t measured, const uint32_t desired, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess)
 Check if we match a space signal(measured) with the desired within +/-tolerance percent, after an expected is excess is removed. More...
 

Private Member Functions

uint8_t _validTolerance (const uint8_t percentage)
 Convert the tolerance percentage into something valid. More...
 
void copyIrParams (volatile irparams_t *src, irparams_t *dst)
 Make a copy of the interrupt state & buffer data. Needed because irparams is marked as volatile, thus memcpy() isn't allowed. Only call this when you know the interrupt handlers won't modify anything. i.e. In kStopState. More...
 
uint16_t compare (const uint16_t oldval, const uint16_t newval)
 Compare two tick values. More...
 
uint32_t ticksLow (const uint32_t usecs, const uint8_t tolerance=kUseDefTol, const uint16_t delta=0)
 Calculate the lower bound of the nr. of ticks. More...
 
uint32_t ticksHigh (const uint32_t usecs, const uint8_t tolerance=kUseDefTol, const uint16_t delta=0)
 Calculate the upper bound of the nr. of ticks. More...
 
bool matchAtLeast (const uint32_t measured, const uint32_t desired, const uint8_t tolerance=kUseDefTol, const uint16_t delta=0)
 Check if we match a pulse(measured) of at least desired within tolerance percent and/or a fixed delta margin. More...
 
uint16_t _matchGeneric (volatile uint16_t *data_ptr, uint64_t *result_bits_ptr, uint8_t *result_ptr, const bool use_bits, const uint16_t remaining, const uint16_t required, const uint16_t hdrmark, const uint32_t hdrspace, const uint16_t onemark, const uint32_t onespace, const uint16_t zeromark, const uint32_t zerospace, const uint16_t footermark, const uint32_t footerspace, const bool atleast=false, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess, const bool MSBfirst=true)
 Match & decode a generic/typical IR message. The data is stored in result_bits_ptr or result_bytes_ptr depending on flag use_bits. More...
 
match_result_t matchData (volatile uint16_t *data_ptr, const uint16_t nbits, const uint16_t onemark, const uint32_t onespace, const uint16_t zeromark, const uint32_t zerospace, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess, const bool MSBfirst=true, const bool expectlastspace=true)
 Match & decode the typical data section of an IR message. The data value is stored in the least significant bits reguardless of the bit ordering requested. More...
 
uint16_t matchBytes (volatile uint16_t *data_ptr, uint8_t *result_ptr, const uint16_t remaining, const uint16_t nbytes, const uint16_t onemark, const uint32_t onespace, const uint16_t zeromark, const uint32_t zerospace, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess, const bool MSBfirst=true, const bool expectlastspace=true)
 Match & decode the typical data section of an IR message. The bytes are stored at result_ptr. The first byte in the result equates to the first byte encountered, and so on. More...
 
uint16_t matchGeneric (volatile uint16_t *data_ptr, uint64_t *result_ptr, const uint16_t remaining, const uint16_t nbits, const uint16_t hdrmark, const uint32_t hdrspace, const uint16_t onemark, const uint32_t onespace, const uint16_t zeromark, const uint32_t zerospace, const uint16_t footermark, const uint32_t footerspace, const bool atleast=false, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess, const bool MSBfirst=true)
 Match & decode a generic/typical <= 64bit IR message. The data is stored at result_ptr. More...
 
uint16_t matchGeneric (volatile uint16_t *data_ptr, uint8_t *result_ptr, const uint16_t remaining, const uint16_t nbits, const uint16_t hdrmark, const uint32_t hdrspace, const uint16_t onemark, const uint32_t onespace, const uint16_t zeromark, const uint32_t zerospace, const uint16_t footermark, const uint32_t footerspace, const bool atleast=false, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess, const bool MSBfirst=true)
 Match & decode a generic/typical > 64bit IR message. The bytes are stored at result_ptr. The first byte in the result equates to the first byte encountered, and so on. More...
 
uint16_t matchGenericConstBitTime (volatile uint16_t *data_ptr, uint64_t *result_ptr, const uint16_t remaining, const uint16_t nbits, const uint16_t hdrmark, const uint32_t hdrspace, const uint16_t one, const uint32_t zero, const uint16_t footermark, const uint32_t footerspace, const bool atleast=false, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess, const bool MSBfirst=true)
 Match & decode a generic/typical constant bit time <= 64bit IR message. The data is stored at result_ptr. More...
 
uint16_t matchManchesterData (volatile const uint16_t *data_ptr, uint64_t *result_ptr, const uint16_t remaining, const uint16_t nbits, const uint16_t half_period, const uint16_t starting_balance=0, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess, const bool MSBfirst=true, const bool GEThomas=true)
 Match & decode a Manchester Code data (<= 64bits. More...
 
uint16_t matchManchester (volatile const uint16_t *data_ptr, uint64_t *result_ptr, const uint16_t remaining, const uint16_t nbits, const uint16_t hdrmark, const uint32_t hdrspace, const uint16_t clock_period, const uint16_t footermark, const uint32_t footerspace, const bool atleast=false, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess, const bool MSBfirst=true, const bool GEThomas=true)
 Match & decode a Manchester Code <= 64bit IR message. The data is stored at result_ptr. More...
 
void crudeNoiseFilter (decode_results *results, const uint16_t floor=0)
 Remove or merge pulses in the capture buffer that are too short. More...
 
bool decodeHash (decode_results *results)
 Decode any arbitrary IR message into a 32-bit code value. Instead of decoding using a standard encoding scheme (e.g. Sony, NEC, RC5), the code is hashed to a 32-bit value. More...
 
bool decodeVoltas (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kVoltasBits, const bool strict=true)
 Decode the supplied Voltas message. Status: STABLE / Working on real device. More...
 
bool decodeNEC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kNECBits, const bool strict=true)
 Decode the supplied NEC (Renesas) message. Status: STABLE / Known good. More...
 
bool decodeArgo (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kArgoBits, const bool strict=true)
 Decode the supplied Argo message. Status: BETA / Probably works. More...
 
bool decodeSony (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kSonyMinBits, const bool strict=false)
 Decode the supplied Sony/SIRC message. Status: STABLE / Should be working. strict mode is ALPHA / Untested. More...
 
bool decodeSanyoLC7461 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kSanyoLC7461Bits, const bool strict=true)
 Decode the supplied SANYO LC7461 message. Status: BETA / Probably works. More...
 
bool decodeSanyoAc (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kSanyoAcBits, const bool strict=true)
 Decode the supplied SanyoAc message. Status: STABLE / Reported as working. More...
 
bool decodeMitsubishi (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMitsubishiBits, const bool strict=true)
 Decode the supplied Mitsubishi 16-bit message. Status: STABLE / Working. More...
 
bool decodeMitsubishi2 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMitsubishiBits, const bool strict=true)
 Decode the supplied second variation of a Mitsubishi 16-bit message. Status: STABLE / Working. More...
 
bool decodeMitsubishiAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMitsubishiACBits, const bool strict=false)
 Decode the supplied Mitsubish 144-bit A/C message. Status: BETA / Probably works. More...
 
bool decodeMitsubishi136 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMitsubishi136Bits, const bool strict=true)
 Decode the supplied Mitsubishi 136-bit A/C message. (MITSUBISHI136) Status: STABLE / Reported as working. More...
 
bool decodeMitsubishi112 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMitsubishi112Bits, const bool strict=true)
 Decode the supplied Mitsubishi/TCL 112-bit A/C message. (MITSUBISHI112, TCL112AC) Status: STABLE / Reported as working. More...
 
bool decodeMitsubishiHeavy (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMitsubishiHeavy152Bits, const bool strict=true)
 Decode the supplied Mitsubishi Heavy Industries A/C message. Status: BETA / Appears to be working. Needs testing against a real device. More...
 
int16_t getRClevel (decode_results *results, uint16_t *offset, uint16_t *used, uint16_t bitTime, const uint8_t tolerance=kUseDefTol, const int16_t excess=kMarkExcess, const uint16_t delta=0, const uint8_t maxwidth=3)
 Gets one undecoded level at a time from the raw buffer. The RC5/6 decoding is easier if the data is broken into time intervals. E.g. if the buffer has MARK for 2 time intervals and SPACE for 1, successive calls to getRClevel will return MARK, MARK, SPACE. offset and used are updated to keep track of the current position. More...
 
bool decodeRC5 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kRC5XBits, const bool strict=true)
 Decode the supplied RC-5/RC5X message. Status: RC-5 (stable), RC-5X (alpha) More...
 
bool decodeRC6 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kRC6Mode0Bits, const bool strict=false)
 Decode the supplied RC6 message. Status: Stable. More...
 
bool decodeRCMM (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kRCMMBits, const bool strict=false)
 Decode a Philips RC-MM packet (between 12 & 32 bits) if possible. Status: STABLE / Should be working. More...
 
bool decodePanasonic (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kPanasonicBits, const bool strict=false, const uint32_t manufacturer=kPanasonicManufacturer)
 Decode the supplied Panasonic message. Status: STABLE / Should be working. More...
 
bool decodeLG (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kLgBits, const bool strict=false)
 Decode the supplied LG message. Status: STABLE / Working. More...
 
bool decodeInax (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kInaxBits, const bool strict=true)
 Decode the supplied Inax Toilet message. Status: Stable / Known working. More...
 
bool decodeJVC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kJvcBits, const bool strict=true)
 Decode the supplied JVC message. Status: Stable / Known working. More...
 
bool decodeSAMSUNG (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kSamsungBits, const bool strict=true)
 Decode the supplied Samsung 32-bit message. Status: STABLE. More...
 
bool decodeSamsung36 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kSamsung36Bits, const bool strict=true)
 Decode the supplied Samsung36 message. Status: STABLE / Expected to work. More...
 
bool decodeSamsungAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kSamsungAcBits, const bool strict=true)
 Decode the supplied Samsung A/C message. Status: Stable / Known to be working. More...
 
bool decodeWhynter (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kWhynterBits, const bool strict=true)
 Decode the supplied Whynter message. Status: STABLE / Working. Strict mode is ALPHA. More...
 
bool decodeCOOLIX (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kCoolixBits, const bool strict=true)
 Decode the supplied Coolix A/C message. Status: STABLE / Known Working. More...
 
bool decodeDenon (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDenonBits, const bool strict=true)
 Decode the supplied Delonghi A/C message. Status: STABLE / Should work fine. More...
 
bool decodeDISH (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDishBits, const bool strict=true)
 Decode the supplied DISH NETWORK message. Status: ALPHA (untested and unconfirmed.) More...
 
bool decodeSharp (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kSharpBits, const bool strict=true, const bool expansion=true)
 Decode the supplied Sharp message. Status: STABLE / Working fine. More...
 
bool decodeSharpAc (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kSharpAcBits, const bool strict=true)
 Decode the supplied Sharp A/C message. Status: STABLE / Known working. More...
 
bool decodeAiwaRCT501 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kAiwaRcT501Bits, const bool strict=true)
 Decode the supplied Aiwa RC T501 message. Status: BETA / Should work. More...
 
bool decodeNikai (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kNikaiBits, const bool strict=true)
 Decode the supplied Nikai message. Status: STABLE / Working. More...
 
bool decodeMagiQuest (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMagiquestBits, const bool strict=true)
 Decode the supplied MagiQuest message. Status: Beta / Should work. More...
 
bool decodeKelvinator (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kKelvinatorBits, const bool strict=true)
 Decode the supplied Kelvinator message. Status: STABLE / Known working. More...
 
bool decodeDaikin (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDaikinBits, const bool strict=true)
 Decode the supplied Daikin 280-bit message. (DAIKIN) Status: STABLE / Reported as working. More...
 
bool decodeDaikin64 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDaikin64Bits, const bool strict=true)
 Decode the supplied Daikin 64-bit message. (DAIKIN64) Status: Beta / Probably Working. More...
 
bool decodeDaikin128 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDaikin128Bits, const bool strict=true)
 Decode the supplied Daikin 128-bit message. (DAIKIN128) Status: STABLE / Known Working. More...
 
bool decodeDaikin152 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDaikin152Bits, const bool strict=true)
 Decode the supplied Daikin 152-bit message. (DAIKIN152) Status: STABLE / Known Working. More...
 
bool decodeDaikin160 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDaikin160Bits, const bool strict=true)
 Decode the supplied Daikin 160-bit message. (DAIKIN160) Status: STABLE / Confirmed working. More...
 
bool decodeDaikin176 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDaikin176Bits, const bool strict=true)
 Decode the supplied Daikin 176-bit message. (DAIKIN176) Status: STABLE / Expected to work. More...
 
bool decodeDaikin2 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDaikin2Bits, const bool strict=true)
 Decode the supplied Daikin 312-bit message. (DAIKIN2) Status: STABLE / Works as expected. More...
 
bool decodeDaikin216 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDaikin216Bits, const bool strict=true)
 Decode the supplied Daikin 216-bit message. (DAIKIN216) Status: STABLE / Should be working. More...
 
bool decodeToshibaAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kToshibaACBits, const bool strict=true)
 Decode the supplied Toshiba A/C message. Status: STABLE / Working. More...
 
bool decodeTrotec (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kTrotecBits, const bool strict=true)
 Decode the supplied Trotec message. Status: STABLE / Works. Untested on real devices. More...
 
bool decodeMidea (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMideaBits, const bool strict=true)
 Decode the supplied Midea message. Status: Alpha / Needs testing against a real device. More...
 
bool decodeMidea24 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMidea24Bits, const bool strict=true)
 Decode the supplied Midea24 message. Status: STABLE / Confirmed working on a real device. More...
 
bool decodeFujitsuAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kFujitsuAcBits, const bool strict=false)
 Decode the supplied Fujitsu AC IR message if possible. Status: STABLE / Working. More...
 
bool decodeLasertag (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kLasertagBits, const bool strict=true)
 Decode the supplied Lasertag message. Status: BETA / Appears to be working 90% of the time. More...
 
bool decodeMilestag2 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMilesTag2ShotBits, const bool strict=true)
 Decode the supplied MilesTag2 message. Status: ALPHA / Probably works but needs testing with a real device. More...
 
bool decodeCarrierAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kCarrierAcBits, const bool strict=true)
 Decode the supplied Carrier HVAC message. More...
 
bool decodeCarrierAC40 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kCarrierAc40Bits, const bool strict=true)
 Decode the supplied Carrier 40-bit HVAC message. Carrier HVAC messages contain only 40 bits, but it is sent three(3) times. Status: STABLE / Tested against a real device. More...
 
bool decodeCarrierAC64 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kCarrierAc64Bits, const bool strict=true)
 Decode the supplied Carrier 64-bit HVAC message. Status: STABLE / Known to be working. More...
 
bool decodeGoodweather (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kGoodweatherBits, const bool strict=true)
 Decode the supplied Goodweather message. Status: BETA / Probably works. More...
 
bool decodeGree (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kGreeBits, const bool strict=true)
 Decode the supplied Gree HVAC message. Status: STABLE / Working. More...
 
bool decodeHaierAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kHaierACBits, const bool strict=true)
 Decode the supplied Haier HSU07-HEA03 remote message. Status: STABLE / Known to be working. More...
 
bool decodeHaierACYRW02 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kHaierACYRW02Bits, const bool strict=true)
 Decode the supplied Haier YR-W02 remote A/C message. Status: BETA / Appears to be working. More...
 
bool decodeHitachiAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kHitachiAcBits, const bool strict=true, const bool MSBfirst=true)
 Decode the supplied Hitachi A/C message. Status: STABLE / Expected to work. More...
 
bool decodeHitachiAC1 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kHitachiAc1Bits, const bool strict=true)
 
bool decodeHitachiAc3 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kHitachiAc3Bits, const bool strict=true)
 Decode the supplied Hitachi 15to27-byte/120to216-bit A/C message. Status: STABLE / Works fine. More...
 
bool decodeHitachiAc424 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kHitachiAc424Bits, const bool strict=true)
 Decode the supplied Hitachi 53-byte/424-bit A/C message. Status: STABLE / Reported as working. More...
 
bool decodeGICable (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kGicableBits, const bool strict=true)
 Decode the supplied G.I. Cable message. Status: Alpha / Not tested against a real device. More...
 
bool decodeWhirlpoolAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kWhirlpoolAcBits, const bool strict=true)
 Decode the supplied Whirlpool A/C message. Status: STABLE / Working as intended. More...
 
bool decodeLutron (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kLutronBits, const bool strict=true)
 Decode the supplied Lutron message. Status: STABLE / Working. More...
 
bool decodeElectraAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kElectraAcBits, const bool strict=true)
 Decode the supplied Electra A/C message. Status: STABLE / Known working. More...
 
bool decodePanasonicAC (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kPanasonicAcBits, const bool strict=true)
 Decode the supplied Panasonic AC message. Status: STABLE / Works with real device(s). More...
 
bool decodePanasonicAC32 (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kPanasonicAc32Bits, const bool strict=true)
 Decode the supplied Panasonic AC 32/16bit message. Status: STABLE / Confirmed working. More...
 
bool decodePioneer (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kPioneerBits, const bool strict=true)
 Decode the supplied Pioneer message. Status: STABLE / Should be working. (Self decodes & real examples) More...
 
bool decodeMWM (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=24, const bool strict=true)
 Decode the supplied MWM message. Status: Implemented. More...
 
bool decodeVestelAc (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kVestelAcBits, const bool strict=true)
 Decode the supplied Vestel message. Status: Alpha / Needs testing against a real device. More...
 
bool decodeTeco (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kTecoBits, const bool strict=false)
 Decode the supplied Teco message. Status: STABLE / Tested. More...
 
bool decodeLegoPf (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kLegoPfBits, const bool strict=true)
 Decode the supplied LEGO Power Functions message. Status: STABLE / Appears to work. More...
 
bool decodeNeoclima (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kNeoclimaBits, const bool strict=true)
 Decode the supplied Neoclima message. Status: STABLE / Known working. More...
 
bool decodeAmcor (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kAmcorBits, const bool strict=true)
 Decode the supplied Amcor HVAC message. Status: STABLE / Reported as working. More...
 
bool decodeEpson (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kEpsonBits, const bool strict=true)
 Decode the supplied Epson message. Status: Beta / Probably works. More...
 
bool decodeSymphony (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kSymphonyBits, const bool strict=true)
 Decode the supplied Symphony packet/message. Status: STABLE / Should be working. More...
 
bool decodeAirwell (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kAirwellBits, const bool strict=true)
 Decode the supplied Airwell "Manchester code" message. More...
 
bool decodeDelonghiAc (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDelonghiAcBits, const bool strict=true)
 Decode the supplied Delonghi A/C message. Status: STABLE / Expected to be working. More...
 
bool decodeDoshisha (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kDoshishaBits, const bool strict=true)
 Decode the supplied Doshisha message. Status: STABLE / Works on real device. More...
 
bool decodeMultibrackets (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMultibracketsBits, const bool strict=true)
 Decode the Multibrackets message. Status: BETA / Appears to be working. More...
 
bool decodeTechnibelAc (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kTechnibelAcBits, const bool strict=true)
 Status: STABLE / Reported as working on a real device. More...
 
bool decodeCoronaAc (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kCoronaAcBitsShort, const bool strict=true)
 Decode the supplied CoronaAc message. Status: STABLE / Appears to be working. More...
 
bool decodeZepeal (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kZepealBits, const bool strict=true)
 Decode the supplied Zepeal message. Status: STABLE / Works on real device. More...
 
bool decodeMetz (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMetzBits, const bool strict=true)
 Decode the supplied Metz message. Status: BETA / Probably works. More...
 
bool decodeTranscold (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kTranscoldBits, const bool strict=true)
 Decode the supplied Transcold A/C message. Status: STABLE / Known Working. More...
 
bool decodeMirage (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kMirageBits, const bool strict=true)
 Decode the supplied Mirage message. Status: STABLE / Reported as working. More...
 
bool decodeElitescreens (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kEliteScreensBits, const bool strict=true)
 Decode the supplied Elite Screens message. Status: STABLE / Confirmed working. More...
 
bool decodeEcoclim (decode_results *results, uint16_t offset=kStartOffset, const uint16_t nbits=kEcoclimBits, const bool strict=true)
 Decode the supplied EcoClim A/C message. Status: STABLE / Confirmed working on real remote. More...
 

Private Attributes

irparams_tirparams_save
 
uint8_t _tolerance
 
uint8_t _timer_num
 
uint16_t _unknown_threshold
 

Detailed Description

Class for receiving IR messages.

Constructor & Destructor Documentation

◆ IRrecv() [1/2]

IRrecv::IRrecv ( const uint16_t  recvpin,
const uint16_t  bufsize = kRawBuf,
const uint8_t  timeout = kTimeoutMs,
const bool  save_buffer = false,
const uint8_t  timer_num = kDefaultESP32Timer 
)
explicit

Class constructor Args:

Parameters
[in]recvpinThe GPIO pin the IR receiver module's data pin is connected to.
[in]bufsizeNr. of entries to have in the capture buffer. (Default: kRawBuf)
[in]timeoutNr. of milli-Seconds of no signal before we stop capturing data. (Default: kTimeoutMs)
[in]save_bufferUse a second (save) buffer to decode from. (Default: false)
[in]timer_numNr. of the ESP32 timer to use (0 to 3) (ESP32 Only)

◆ IRrecv() [2/2]

IRrecv::IRrecv ( const uint16_t  recvpin,
const uint16_t  bufsize = kRawBuf,
const uint8_t  timeout = kTimeoutMs,
const bool  save_buffer = false 
)
explicit

◆ ~IRrecv()

IRrecv::~IRrecv ( void  )

Class destructor Cleans up after the object is no longer needed. e.g. Frees up all memory used by the various buffers, and disables any timers or interrupts used.

Member Function Documentation

◆ _matchGeneric()

uint16_t IRrecv::_matchGeneric ( volatile uint16_t *  data_ptr,
uint64_t *  result_bits_ptr,
uint8_t *  result_bytes_ptr,
const bool  use_bits,
const uint16_t  remaining,
const uint16_t  nbits,
const uint16_t  hdrmark,
const uint32_t  hdrspace,
const uint16_t  onemark,
const uint32_t  onespace,
const uint16_t  zeromark,
const uint32_t  zerospace,
const uint16_t  footermark,
const uint32_t  footerspace,
const bool  atleast = false,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess,
const bool  MSBfirst = true 
)
private

Match & decode a generic/typical IR message. The data is stored in result_bits_ptr or result_bytes_ptr depending on flag use_bits.

Note
Values of 0 for hdrmark, hdrspace, footermark, or footerspace mean skip that requirement.
Parameters
[in]data_ptrA pointer to where we are at in the capture buffer.
[out]result_bits_ptrA pointer to where to start storing the bits we decoded.
[out]result_bytes_ptrA pointer to where to start storing the bytes we decoded.
[in]use_bitsA flag indicating if we are to decode bits or bytes.
[in]remainingThe size of the capture buffer remaining.
[in]nbitsNr. of data bits we expect.
[in]hdrmarkNr. of uSeconds for the expected header mark signal.
[in]hdrspaceNr. of uSeconds for the expected header space signal.
[in]onemarkNr. of uSeconds in an expected mark signal for a '1' bit.
[in]onespaceNr. of uSecs in an expected space signal for a '1' bit.
[in]zeromarkNr. of uSecs in an expected mark signal for a '0' bit.
[in]zerospaceNr. of uSecs in an expected space signal for a '0' bit.
[in]footermarkNr. of uSeconds for the expected footer mark signal.
[in]footerspaceNr. of uSeconds for the expected footer space/gap signal.
[in]atleastIs the match on the footerspace a matchAtLeast or matchSpace?
[in]tolerancePercentage error margin to allow. (Default: kUseDefTol)
[in]excessNr. of uSeconds. (Def: kMarkExcess)
[in]MSBfirstBit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First
Returns
If successful, how many buffer entries were used. Otherwise 0.

◆ _validTolerance()

uint8_t IRrecv::_validTolerance ( const uint8_t  percentage)
private

Convert the tolerance percentage into something valid.

Parameters
[in]percentageAn integer percentage.

◆ compare()

uint16_t IRrecv::compare ( const uint16_t  oldval,
const uint16_t  newval 
)
private

Compare two tick values.

Parameters
[in]oldvalNr. of ticks.
[in]newvalNr. of ticks.
Returns
0 if newval is shorter, 1 if it is equal, & 2 if it is longer.
Note
Use a tolerance of 20%

◆ copyIrParams()

void IRrecv::copyIrParams ( volatile irparams_t src,
irparams_t dst 
)
private

Make a copy of the interrupt state & buffer data. Needed because irparams is marked as volatile, thus memcpy() isn't allowed. Only call this when you know the interrupt handlers won't modify anything. i.e. In kStopState.

Parameters
[in]srcPointer to an irparams_t structure to copy from.
[out]dstPointer to an irparams_t structure to copy to.

◆ crudeNoiseFilter()

void IRrecv::crudeNoiseFilter ( decode_results results,
const uint16_t  floor = 0 
)
private

Remove or merge pulses in the capture buffer that are too short.

Parameters
[in,out]resultsPtr to the decode_results we are going to filter.
[in]floorOnly allow values in the buffer large than this. (in microSeconds)

◆ decode()

bool IRrecv::decode ( decode_results results,
irparams_t save = NULL,
uint8_t  max_skip = 0,
uint16_t  noise_floor = 0 
)

Decodes the received IR message. If the interrupt state is saved, we will immediately resume waiting for the next IR message to avoid missing messages.

Note
There is a trade-off here. Saving the state means less time lost until we can receiving the next message vs. using more RAM. Choose appropriately.
Parameters
[out]resultsA PTR to where the decoded IR message will be stored.
[out]saveA PTR to an irparams_t instance in which to save the interrupt's memory/state. NULL means don't save it.
[in]max_skipMaximum Nr. of pulses at the begining of a capture we can skip when attempting to find a protocol we can successfully decode. This parameter can dramatically improve detection of protocols when there is light IR interference just before an incoming IR message, however, it comes at a steep performace price. (Default is 0. No skipping.)
Warning
Increasing the max_skip value will dramatically (linearly) increase the cpu time & usage to decode protocols. e.g. 0 -> 1 will be a 2x increase in cpu usage/time. 0 -> 2 will be a 3x increase etc. If you are going to do this, consider disabling protocol decoding for protocols you are not expecting.
Parameters
[in]noise_floorPulses below this size (in usecs) will be removed or merged prior to any decoding. This is to try to remove noise/poor readings & slightly increase the chances of a successful decode but at the cost of data fidelity & integrity. (Defaults to 0 usecs. i.e. Don't filter; which is safe!)
Warning
DANGER: Here Be Dragons! If you set the noise_floor value too high, it WILL break decoding of some protocols. You have been warned! Any non-zero value has the potential to cook the captured raw data i.e. The raw data is going to lie to you. It may obscure hardware, circuit, & environment issues thus making it impossible to support you accurately or confidently. Values of <= 50 usecs will probably be safe. 51 - 100 usecs might be okay. 100 - 150 usecs is "Danger, Will Robinson!". 150 - 200 usecs expect broken protocols. At 200+ usecs, you have protocols you can't decode!!
Returns
A boolean indicating if an IR message is ready or not.

◆ decodeAirwell()

bool IRrecv::decodeAirwell ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kAirwellBits,
const bool  strict = true 
)
private

Decode the supplied Airwell "Manchester code" message.

Status: BETA / Appears to be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/1069

◆ decodeAiwaRCT501()

bool IRrecv::decodeAiwaRCT501 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kAiwaRcT501Bits,
const bool  strict = true 
)
private

Decode the supplied Aiwa RC T501 message. Status: BETA / Should work.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
Note
Aiwa RC T501 appears to be a 42 bit variant of the NEC1 protocol. However, we historically (original Arduino IRremote project) treats it as a 15 bit (data) protocol. So, we expect nbits to typically be 15, and we will remove the prefix and postfix from the raw data, and use that as the result.
See also
http://www.sbprojects.net/knowledge/ir/nec.php
https://github.com/crankyoldgit/IRremoteESP8266/issues/1069

◆ decodeAmcor()

bool IRrecv::decodeAmcor ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kAmcorBits,
const bool  strict = true 
)
private

Decode the supplied Amcor HVAC message. Status: STABLE / Reported as working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeArgo()

bool IRrecv::decodeArgo ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kArgoBits,
const bool  strict = true 
)
private

Decode the supplied Argo message. Status: BETA / Probably works.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
Note
This decoder is based soley off sendArgo(). We have no actual captures to test this against. If you have one of these units, please let us know.

◆ decodeCarrierAC()

bool IRrecv::decodeCarrierAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kCarrierAcBits,
const bool  strict = true 
)
private

Decode the supplied Carrier HVAC message.

Note
Carrier HVAC messages contain only 32 bits, but it is sent three(3) times. i.e. normal + inverted + normal Status: BETA / Probably works.
Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeCarrierAC40()

bool IRrecv::decodeCarrierAC40 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kCarrierAc40Bits,
const bool  strict = true 
)
private

Decode the supplied Carrier 40-bit HVAC message. Carrier HVAC messages contain only 40 bits, but it is sent three(3) times. Status: STABLE / Tested against a real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeCarrierAC64()

bool IRrecv::decodeCarrierAC64 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kCarrierAc64Bits,
const bool  strict = true 
)
private

Decode the supplied Carrier 64-bit HVAC message. Status: STABLE / Known to be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeCOOLIX()

bool IRrecv::decodeCOOLIX ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kCoolixBits,
const bool  strict = true 
)
private

Decode the supplied Coolix A/C message. Status: STABLE / Known Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeCoronaAc()

bool IRrecv::decodeCoronaAc ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kCoronaAcBitsShort,
const bool  strict = true 
)
private

Decode the supplied CoronaAc message. Status: STABLE / Appears to be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store it
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeDaikin()

bool IRrecv::decodeDaikin ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDaikinBits,
const bool  strict = true 
)
private

Decode the supplied Daikin 280-bit message. (DAIKIN) Status: STABLE / Reported as working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/tree/master/IRremote

◆ decodeDaikin128()

bool IRrecv::decodeDaikin128 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDaikin128Bits,
const bool  strict = true 
)
private

Decode the supplied Daikin 128-bit message. (DAIKIN128) Status: STABLE / Known Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/827

◆ decodeDaikin152()

bool IRrecv::decodeDaikin152 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDaikin152Bits,
const bool  strict = true 
)
private

Decode the supplied Daikin 152-bit message. (DAIKIN152) Status: STABLE / Known Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/873

◆ decodeDaikin160()

bool IRrecv::decodeDaikin160 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDaikin160Bits,
const bool  strict = true 
)
private

Decode the supplied Daikin 160-bit message. (DAIKIN160) Status: STABLE / Confirmed working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/731

◆ decodeDaikin176()

bool IRrecv::decodeDaikin176 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDaikin176Bits,
const bool  strict = true 
)
private

Decode the supplied Daikin 176-bit message. (DAIKIN176) Status: STABLE / Expected to work.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeDaikin2()

bool IRrecv::decodeDaikin2 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDaikin2Bits,
const bool  strict = true 
)
private

Decode the supplied Daikin 312-bit message. (DAIKIN2) Status: STABLE / Works as expected.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeDaikin216()

bool IRrecv::decodeDaikin216 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDaikin216Bits,
const bool  strict = true 
)
private

Decode the supplied Daikin 216-bit message. (DAIKIN216) Status: STABLE / Should be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/689
https://github.com/danny-source/Arduino_DY_IRDaikin

◆ decodeDaikin64()

bool IRrecv::decodeDaikin64 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDaikin64Bits,
const bool  strict = true 
)
private

Decode the supplied Daikin 64-bit message. (DAIKIN64) Status: Beta / Probably Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/1064

◆ decodeDelonghiAc()

bool IRrecv::decodeDelonghiAc ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDelonghiAcBits,
const bool  strict = true 
)
private

Decode the supplied Delonghi A/C message. Status: STABLE / Expected to be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/1096

◆ decodeDenon()

bool IRrecv::decodeDenon ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDenonBits,
const bool  strict = true 
)
private

Decode the supplied Delonghi A/C message. Status: STABLE / Should work fine.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Denon.cpp

◆ decodeDISH()

bool IRrecv::decodeDISH ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDishBits,
const bool  strict = true 
)
private

Decode the supplied DISH NETWORK message. Status: ALPHA (untested and unconfirmed.)

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
Note
Dishplayer is a different protocol. Typically a DISH device needs to get a command a total of at least 4 times to accept it.
See also
http://www.hifi-remote.com/wiki/index.php?title=Dish
http://lirc.sourceforge.net/remotes/echostar/301_501_3100_5100_58xx_59xx
https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Dish.cpp

◆ decodeDoshisha()

bool IRrecv::decodeDoshisha ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kDoshishaBits,
const bool  strict = true 
)
private

Decode the supplied Doshisha message. Status: STABLE / Works on real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeEcoclim()

bool IRrecv::decodeEcoclim ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kEcoclimBits,
const bool  strict = true 
)
private

Decode the supplied EcoClim A/C message. Status: STABLE / Confirmed working on real remote.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeElectraAC()

bool IRrecv::decodeElectraAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kElectraAcBits,
const bool  strict = true 
)
private

Decode the supplied Electra A/C message. Status: STABLE / Known working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeElitescreens()

bool IRrecv::decodeElitescreens ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kEliteScreensBits,
const bool  strict = true 
)
private

Decode the supplied Elite Screens message. Status: STABLE / Confirmed working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeEpson()

bool IRrecv::decodeEpson ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kEpsonBits,
const bool  strict = true 
)
private

Decode the supplied Epson message. Status: Beta / Probably works.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
Note
Experimental data indicates there are at least three messages (first + 2 repeats). We only require the first + a single repeat to match. This helps us distinguish it from NEC messages which are near identical.

◆ decodeFujitsuAC()

bool IRrecv::decodeFujitsuAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kFujitsuAcBits,
const bool  strict = false 
)
private

Decode the supplied Fujitsu AC IR message if possible. Status: STABLE / Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeGICable()

bool IRrecv::decodeGICable ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kGicableBits,
const bool  strict = true 
)
private

Decode the supplied G.I. Cable message. Status: Alpha / Not tested against a real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeGoodweather()

bool IRrecv::decodeGoodweather ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kGoodweatherBits,
const bool  strict = true 
)
private

Decode the supplied Goodweather message. Status: BETA / Probably works.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeGree()

bool IRrecv::decodeGree ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kGreeBits,
const bool  strict = true 
)
private

Decode the supplied Gree HVAC message. Status: STABLE / Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeHaierAC()

bool IRrecv::decodeHaierAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kHaierACBits,
const bool  strict = true 
)
private

Decode the supplied Haier HSU07-HEA03 remote message. Status: STABLE / Known to be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeHaierACYRW02()

bool IRrecv::decodeHaierACYRW02 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kHaierACYRW02Bits,
const bool  strict = true 
)
private

Decode the supplied Haier YR-W02 remote A/C message. Status: BETA / Appears to be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeHash()

bool IRrecv::decodeHash ( decode_results results)
private

Decode any arbitrary IR message into a 32-bit code value. Instead of decoding using a standard encoding scheme (e.g. Sony, NEC, RC5), the code is hashed to a 32-bit value.

The algorithm: look at the sequence of MARK signals, and see if each one is shorter (0), the same length (1), or longer (2) than the previous. Do the same with the SPACE signals. Hash the resulting sequence of 0's, 1's, and 2's to a 32-bit value. This will give a unique value for each different code (probably), for most code systems.

See also
http://arcfn.com/2010/01/using-arbitrary-remotes-with-arduino.html
Note
This isn't a "real" decoding, just an arbitrary value. Hopefully this code is unique for each button.

◆ decodeHitachiAC()

bool IRrecv::decodeHitachiAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kHitachiAcBits,
const bool  strict = true,
const bool  MSBfirst = true 
)
private

Decode the supplied Hitachi A/C message. Status: STABLE / Expected to work.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect. Typically kHitachiAcBits, kHitachiAc1Bits, kHitachiAc2Bits, kHitachiAc344Bits
[in]strictFlag indicating if we should perform strict matching.
[in]MSBfirstIs the data per byte stored in MSB First (true) or LSB First order(false)?
Returns
True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/417
https://github.com/crankyoldgit/IRremoteESP8266/issues/453
https://github.com/crankyoldgit/IRremoteESP8266/issues/1134

◆ decodeHitachiAC1()

bool IRrecv::decodeHitachiAC1 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kHitachiAc1Bits,
const bool  strict = true 
)
private

◆ decodeHitachiAc3()

bool IRrecv::decodeHitachiAc3 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kHitachiAc3Bits,
const bool  strict = true 
)
private

Decode the supplied Hitachi 15to27-byte/120to216-bit A/C message. Status: STABLE / Works fine.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
This protocol is almost exactly the same as HitachiAC424 except this variant has subtle timing differences and multiple lengths. There are five(5) typical lengths: kHitachiAc3MinStateLength (Cancel Timer), kHitachiAc3MinStateLength + 2 (Change Temp), kHitachiAc3StateLength - 6 (Change Mode), kHitachiAc3StateLength - 4 (Normal), & kHitachiAc3StateLength (Set Timer)
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/1060

◆ decodeHitachiAc424()

bool IRrecv::decodeHitachiAc424 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kHitachiAc424Bits,
const bool  strict = true 
)
private

Decode the supplied Hitachi 53-byte/424-bit A/C message. Status: STABLE / Reported as working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
This protocol is almost exactly the same as HitachiAC2 except this variant has a leader section as well, and subtle timing differences. It is also in LSBF order (per byte), rather than MSBF order.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/973
(Japanese Manual) https://kadenfan.hitachi.co.jp/support/raj/item/docs/ras_aj22h_a_tori.pdf

◆ decodeInax()

bool IRrecv::decodeInax ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kInaxBits,
const bool  strict = true 
)
private

Decode the supplied Inax Toilet message. Status: Stable / Known working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/706

◆ decodeJVC()

bool IRrecv::decodeJVC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kJvcBits,
const bool  strict = true 
)
private

Decode the supplied JVC message. Status: Stable / Known working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
JVC repeat codes don't have a header.
See also
http://www.sbprojects.net/knowledge/ir/jvc.php

◆ decodeKelvinator()

bool IRrecv::decodeKelvinator ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kKelvinatorBits,
const bool  strict = true 
)
private

Decode the supplied Kelvinator message. Status: STABLE / Known working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeLasertag()

bool IRrecv::decodeLasertag ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kLasertagBits,
const bool  strict = true 
)
private

Decode the supplied Lasertag message. Status: BETA / Appears to be working 90% of the time.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
This protocol is pretty much just raw Manchester encoding.
See also
http://www.sbprojects.net/knowledge/ir/rc5.php
https://en.wikipedia.org/wiki/RC-5
https://en.wikipedia.org/wiki/Manchester_code
Todo:
Convert to using matchManchester() if we can.

◆ decodeLegoPf()

bool IRrecv::decodeLegoPf ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kLegoPfBits,
const bool  strict = true 
)
private

Decode the supplied LEGO Power Functions message. Status: STABLE / Appears to work.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeLG()

bool IRrecv::decodeLG ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kLgBits,
const bool  strict = false 
)
private

Decode the supplied LG message. Status: STABLE / Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect. Typically kLgBits or kLg32Bits.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
LG protocol has a repeat code which is 4 items long. Even though the protocol has 28/32 bits of data, only 24/28 bits are distinct. In transmission order, the 28/32 bits are constructed as follows: 8/12 bits of address + 16 bits of command + 4 bits of checksum.
LG 32bit protocol appears near identical to the Samsung protocol. They possibly differ on how they repeat and initial HDR mark.
See also
https://funembedded.wordpress.com/2014/11/08/ir-remote-control-for-lg-conditioner-using-stm32f302-mcu-on-mbed-platform/

◆ decodeLutron()

bool IRrecv::decodeLutron ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kLutronBits,
const bool  strict = true 
)
private

Decode the supplied Lutron message. Status: STABLE / Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeMagiQuest()

bool IRrecv::decodeMagiQuest ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMagiquestBits,
const bool  strict = true 
)
private

Decode the supplied MagiQuest message. Status: Beta / Should work.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
MagiQuest protocol appears to be a header of 8 'zero' bits, followed by 32 bits of "wand ID" and finally 16 bits of "magnitude". Even though we describe this protocol as 56 bits, it really only has 48 bits of data that matter. In transmission order, 8 zeros + 32 wand_id + 16 magnitude.
See also
https://github.com/kitlaan/Arduino-IRremote/blob/master/ir_Magiquest.cpp

◆ decodeMetz()

bool IRrecv::decodeMetz ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMetzBits,
const bool  strict = true 
)
private

Decode the supplied Metz message. Status: BETA / Probably works.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeMidea()

bool IRrecv::decodeMidea ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMideaBits,
const bool  strict = true 
)
private

Decode the supplied Midea message. Status: Alpha / Needs testing against a real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect. Typically kHitachiAcBits, kHitachiAc1Bits, kHitachiAc2Bits, kHitachiAc344Bits
[in]strictFlag indicating if we should perform strict matching.

◆ decodeMidea24()

bool IRrecv::decodeMidea24 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMidea24Bits,
const bool  strict = true 
)
private

Decode the supplied Midea24 message. Status: STABLE / Confirmed working on a real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
Note
This protocol is basically a 48-bit version of the NEC protocol with alternate bytes inverted, thus only 24 bits of real data.
Warning
Can't be used beyond 32 bits.

◆ decodeMilestag2()

bool IRrecv::decodeMilestag2 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMilesTag2ShotBits,
const bool  strict = true 
)
private

Decode the supplied MilesTag2 message. Status: ALPHA / Probably works but needs testing with a real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/1360

◆ decodeMirage()

bool IRrecv::decodeMirage ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMirageBits,
const bool  strict = true 
)
private

Decode the supplied Mirage message. Status: STABLE / Reported as working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeMitsubishi()

bool IRrecv::decodeMitsubishi ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMitsubishiBits,
const bool  strict = true 
)
private

Decode the supplied Mitsubishi 16-bit message. Status: STABLE / Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
This protocol appears to have no header.
See also
GlobalCache's Control Tower's Mitsubishi TV data.

◆ decodeMitsubishi112()

bool IRrecv::decodeMitsubishi112 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMitsubishi112Bits,
const bool  strict = true 
)
private

Decode the supplied Mitsubishi/TCL 112-bit A/C message. (MITSUBISHI112, TCL112AC) Status: STABLE / Reported as working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Note
Note Mitsubishi112 & Tcl112Ac are basically the same protocol. The only significant difference I can see is Mitsubishi112 has a slightly longer header mark. We will use that to determine which variant it should be. The other differences require full decoding and only only with certain settings. There are some other timing differences too, but the tolerances will overlap.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/619
https://github.com/crankyoldgit/IRremoteESP8266/issues/947

◆ decodeMitsubishi136()

bool IRrecv::decodeMitsubishi136 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMitsubishi136Bits,
const bool  strict = true 
)
private

Decode the supplied Mitsubishi 136-bit A/C message. (MITSUBISHI136) Status: STABLE / Reported as working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/888

◆ decodeMitsubishi2()

bool IRrecv::decodeMitsubishi2 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMitsubishiBits,
const bool  strict = true 
)
private

Decode the supplied second variation of a Mitsubishi 16-bit message. Status: STABLE / Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/441

◆ decodeMitsubishiAC()

bool IRrecv::decodeMitsubishiAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMitsubishiACBits,
const bool  strict = false 
)
private

Decode the supplied Mitsubish 144-bit A/C message. Status: BETA / Probably works.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
See also
https://www.analysir.com/blog/2015/01/06/reverse-engineering-mitsubishi-ac-infrared-protocol/

◆ decodeMitsubishiHeavy()

bool IRrecv::decodeMitsubishiHeavy ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMitsubishiHeavy152Bits,
const bool  strict = true 
)
private

Decode the supplied Mitsubishi Heavy Industries A/C message. Status: BETA / Appears to be working. Needs testing against a real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect. Typically kMitsubishiHeavy88Bits or kMitsubishiHeavy152Bits (def).
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeMultibrackets()

bool IRrecv::decodeMultibrackets ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kMultibracketsBits,
const bool  strict = true 
)
private

Decode the Multibrackets message. Status: BETA / Appears to be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeMWM()

bool IRrecv::decodeMWM ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = 24,
const bool  strict = true 
)
private

Decode the supplied MWM message. Status: Implemented.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
This protocol is 2400 bps serial, 1 start bit (mark), 1 stop bit (space), no parity

◆ decodeNEC()

bool IRrecv::decodeNEC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kNECBits,
const bool  strict = true 
)
private

Decode the supplied NEC (Renesas) message. Status: STABLE / Known good.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
NEC protocol has three variants/forms. Normal: an 8 bit address & an 8 bit command in 32 bit data form. i.e. address + inverted(address) + command + inverted(command) Extended: a 16 bit address & an 8 bit command in 32 bit data form. i.e. address + command + inverted(command) Repeat: a 0-bit code. i.e. No data bits. Just the header + footer.
See also
http://www.sbprojects.net/knowledge/ir/nec.php

◆ decodeNeoclima()

bool IRrecv::decodeNeoclima ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kNeoclimaBits,
const bool  strict = true 
)
private

Decode the supplied Neoclima message. Status: STABLE / Known working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeNikai()

bool IRrecv::decodeNikai ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kNikaiBits,
const bool  strict = true 
)
private

Decode the supplied Nikai message. Status: STABLE / Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.

◆ decodePanasonic()

bool IRrecv::decodePanasonic ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kPanasonicBits,
const bool  strict = false,
const uint32_t  manufacturer = kPanasonicManufacturer 
)
private

Decode the supplied Panasonic message. Status: STABLE / Should be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]manufacturerA 16-bit manufacturer code. e.g. 0x4004 is Panasonic
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Warning
Results to be used with sendPanasonic64(), not sendPanasonic().
Note
Panasonic 48-bit protocol is a modified version of Kaseikyo.
See also
http://www.remotecentral.com/cgi-bin/mboard/rc-pronto/thread.cgi?2615
http://www.hifi-remote.com/wiki/index.php?title=Panasonic

◆ decodePanasonicAC()

bool IRrecv::decodePanasonicAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kPanasonicAcBits,
const bool  strict = true 
)
private

Decode the supplied Panasonic AC message. Status: STABLE / Works with real device(s).

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodePanasonicAC32()

bool IRrecv::decodePanasonicAC32 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kPanasonicAc32Bits,
const bool  strict = true 
)
private

Decode the supplied Panasonic AC 32/16bit message. Status: STABLE / Confirmed working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect. Typically: kPanasonicAc32Bits or kPanasonicAc32Bits/2
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/1307
Note
Protocol has two known configurations: (long) Two sections of identical 32 bit data block pairs. ie. (32+32)+(32+32)=128 or (short) A single section of 3 x identical 32 bit data blocks i.e. (32+32+32)=96 Each data block also has a pair of 8 bits repeated identical bits. e.g. (8+8)+(8+8)=32

So each long version really only has 32 unique bits, and the short version really only has 16 unique bits.

◆ decodePioneer()

bool IRrecv::decodePioneer ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kPioneerBits,
const bool  strict = true 
)
private

Decode the supplied Pioneer message. Status: STABLE / Should be working. (Self decodes & real examples)

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeRC5()

bool IRrecv::decodeRC5 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kRC5XBits,
const bool  strict = true 
)
private

Decode the supplied RC-5/RC5X message. Status: RC-5 (stable), RC-5X (alpha)

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
The 'toggle' bit is included as the 6th (MSB) address bit, the MSB of data, & in the count of bits decoded.
Todo:
Serious testing of the RC-5X and strict aspects needs to be done.

◆ decodeRC6()

bool IRrecv::decodeRC6 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kRC6Mode0Bits,
const bool  strict = false 
)
private

Decode the supplied RC6 message. Status: Stable.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Todo:
Testing of the strict compliance aspects.

◆ decodeRCMM()

bool IRrecv::decodeRCMM ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kRCMMBits,
const bool  strict = false 
)
private

Decode a Philips RC-MM packet (between 12 & 32 bits) if possible. Status: STABLE / Should be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeSAMSUNG()

bool IRrecv::decodeSAMSUNG ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kSamsungBits,
const bool  strict = true 
)
private

Decode the supplied Samsung 32-bit message. Status: STABLE.

Note
Samsung messages whilst 32 bits in size, only contain 16 bits of distinct data. e.g. In transmition order: customer_byte + customer_byte(same) + address_byte + invert(address_byte)
Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
LG 32bit protocol appears near identical to the Samsung protocol. They differ on their compliance criteria and how they repeat.
See also
http://elektrolab.wz.cz/katalog/samsung_protocol.pdf

◆ decodeSamsung36()

bool IRrecv::decodeSamsung36 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kSamsung36Bits,
const bool  strict = true 
)
private

Decode the supplied Samsung36 message. Status: STABLE / Expected to work.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/621

◆ decodeSamsungAC()

bool IRrecv::decodeSamsungAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kSamsungAcBits,
const bool  strict = true 
)
private

Decode the supplied Samsung A/C message. Status: Stable / Known to be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/505

◆ decodeSanyoAc()

bool IRrecv::decodeSanyoAc ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kSanyoAcBits,
const bool  strict = true 
)
private

Decode the supplied SanyoAc message. Status: STABLE / Reported as working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/1211

◆ decodeSanyoLC7461()

bool IRrecv::decodeSanyoLC7461 ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kSanyoLC7461Bits,
const bool  strict = true 
)
private

Decode the supplied SANYO LC7461 message. Status: BETA / Probably works.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
Based on @marcosamarinho's work. This protocol uses the NEC protocol. However, data is formatted as : address(13 bits), !address, command (8 bits), !command. According with LIRC, this protocol is used on Sanyo, Aiwa and Chinon Information for this protocol is available at the Sanyo LC7461 datasheet.
See also
http://slydiman.narod.ru/scr/kb/sanyo.htm
https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Sanyo.cpp
http://pdf.datasheetcatalog.com/datasheet/sanyo/LC7461.pdf

◆ decodeSharp()

bool IRrecv::decodeSharp ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kSharpBits,
const bool  strict = true,
const bool  expansion = true 
)
private

Decode the supplied Sharp message. Status: STABLE / Working fine.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
[in]expansionShould we expect the expansion bit to be set. Default is true.
Returns
True if it can decode it, false if it can't.
Note
This procedure returns a value suitable for use in sendSharpRaw().
Todo:
Need to ensure capture of the inverted message as it can be missed due to the interrupt timeout used to detect an end of message. Several compliance checks are disabled until that is resolved.

◆ decodeSharpAc()

bool IRrecv::decodeSharpAc ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kSharpAcBits,
const bool  strict = true 
)
private

Decode the supplied Sharp A/C message. Status: STABLE / Known working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
See also
https://github.com/crankyoldgit/IRremoteESP8266/issues/638
https://github.com/ToniA/arduino-heatpumpir/blob/master/SharpHeatpumpIR.cpp

◆ decodeSony()

bool IRrecv::decodeSony ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kSonyMinBits,
const bool  strict = false 
)
private

Decode the supplied Sony/SIRC message. Status: STABLE / Should be working. strict mode is ALPHA / Untested.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
Note
SONY protocol, SIRC (Serial Infra-Red Control) can be 12, 15, or 20 bits long.

◆ decodeSymphony()

bool IRrecv::decodeSymphony ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kSymphonyBits,
const bool  strict = true 
)
private

Decode the supplied Symphony packet/message. Status: STABLE / Should be working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeTechnibelAc()

bool IRrecv::decodeTechnibelAc ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kTechnibelAcBits,
const bool  strict = true 
)
private

Status: STABLE / Reported as working on a real device.

Parameters
[in,out]resultsPtr to data to decode & where to store the decode
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect (kTechnibelAcBits).
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeTeco()

bool IRrecv::decodeTeco ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kTecoBits,
const bool  strict = false 
)
private

Decode the supplied Teco message. Status: STABLE / Tested.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeToshibaAC()

bool IRrecv::decodeToshibaAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kToshibaACBits,
const bool  strict = true 
)
private

Decode the supplied Toshiba A/C message. Status: STABLE / Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeTranscold()

bool IRrecv::decodeTranscold ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kTranscoldBits,
const bool  strict = true 
)
private

Decode the supplied Transcold A/C message. Status: STABLE / Known Working.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeTrotec()

bool IRrecv::decodeTrotec ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kTrotecBits,
const bool  strict = true 
)
private

Decode the supplied Trotec message. Status: STABLE / Works. Untested on real devices.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeVestelAc()

bool IRrecv::decodeVestelAc ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kVestelAcBits,
const bool  strict = true 
)
private

Decode the supplied Vestel message. Status: Alpha / Needs testing against a real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeVoltas()

bool IRrecv::decodeVoltas ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kVoltasBits,
const bool  strict = true 
)
private

Decode the supplied Voltas message. Status: STABLE / Working on real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ decodeWhirlpoolAC()

bool IRrecv::decodeWhirlpoolAC ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kWhirlpoolAcBits,
const bool  strict = true 
)
private

Decode the supplied Whirlpool A/C message. Status: STABLE / Working as intended.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.

◆ decodeWhynter()

bool IRrecv::decodeWhynter ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kWhynterBits,
const bool  strict = true 
)
private

Decode the supplied Whynter message. Status: STABLE / Working. Strict mode is ALPHA.

Parameters
[in,out]resultsPtr to the data to decode & where to store the result
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect.
[in]strictFlag indicating if we should perform strict matching.
Returns
True if it can decode it, false if it can't.
See also
https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Whynter.cpp

◆ decodeZepeal()

bool IRrecv::decodeZepeal ( decode_results results,
uint16_t  offset = kStartOffset,
const uint16_t  nbits = kZepealBits,
const bool  strict = true 
)
private

Decode the supplied Zepeal message. Status: STABLE / Works on real device.

Parameters
[in,out]resultsPtr to the data to decode & where to store the decode result.
[in]offsetThe starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset.
[in]nbitsThe number of data bits to expect. Typically kZepealBits.
[in]strictFlag indicating if we should perform strict matching.
Returns
A boolean. True if it can decode it, false if it can't.

◆ disableIRIn()

void IRrecv::disableIRIn ( void  )

Stop collection of any received IR data. Disable any timers and interrupts.

◆ enableIRIn()

void IRrecv::enableIRIn ( const bool  pullup = false)

Set up and (re)start the IR capture mechanism.

Parameters
[in]pullupA flag indicating should the GPIO use the internal pullup resistor. (Default: false. i.e. No.)

◆ getBufSize()

uint16_t IRrecv::getBufSize ( void  )

Obtain the maximum number of entries possible in the capture buffer. i.e. It's size.

Returns
The size of the buffer that is in use by the object.

◆ getRClevel()

int16_t IRrecv::getRClevel ( decode_results results,
uint16_t *  offset,
uint16_t *  used,
uint16_t  bitTime,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess,
const uint16_t  delta = 0,
const uint8_t  maxwidth = 3 
)
private

Gets one undecoded level at a time from the raw buffer. The RC5/6 decoding is easier if the data is broken into time intervals. E.g. if the buffer has MARK for 2 time intervals and SPACE for 1, successive calls to getRClevel will return MARK, MARK, SPACE. offset and used are updated to keep track of the current position.

Parameters
[in,out]resultsPtr to the data to decode and where to store the decode result.
[in,out]offsetPtr to the currect offset to the rawbuf.
[in,out]usedPtr to the current used counter.
[in]bitTimeTime interval of single bit in microseconds.
[in]tolerancePercent tolerance to be used in matching.
[in]excessExtra useconds to add to Marks & removed from Spaces.
[in]deltaA non-scaling (+/-) error margin (in useconds).
[in]maxwidthMaximum number of successive levels to find in a single level (default is 3)
Returns
MARK, SPACE, or -1 for error. (The measured time interval is not a multiple of t1.)
See also
https://en.wikipedia.org/wiki/Manchester_code

◆ getTolerance()

uint8_t IRrecv::getTolerance ( void  )

Get the base tolerance percentage for matching incoming IR messages.

Returns
A integer percentage.

◆ match()

bool IRrecv::match ( const uint32_t  measured,
const uint32_t  desired,
const uint8_t  tolerance = kUseDefTol,
const uint16_t  delta = 0 
)

Check if we match a pulse(measured) with the desired within +/-tolerance percent and/or +/- a fixed delta range.

Parameters
[in]measuredThe recorded period of the signal pulse.
[in]desiredThe expected period (in usecs) we are matching against.
[in]toleranceA percentage expressed as an integer. e.g. 10 is 10%.
[in]deltaA non-scaling (+/-) error margin (in useconds).
Returns
A Boolean. true if it matches, false if it doesn't.

◆ matchAtLeast()

bool IRrecv::matchAtLeast ( const uint32_t  measured,
const uint32_t  desired,
const uint8_t  tolerance = kUseDefTol,
const uint16_t  delta = 0 
)
private

Check if we match a pulse(measured) of at least desired within tolerance percent and/or a fixed delta margin.

Parameters
[in]measuredThe recorded period of the signal pulse.
[in]desiredThe expected period (in usecs) we are matching against.
[in]toleranceA percentage expressed as an integer. e.g. 10 is 10%.
[in]deltaA non-scaling amount to reduce usecs by.
Returns
A Boolean. true if it matches, false if it doesn't.

◆ matchBytes()

uint16_t IRrecv::matchBytes ( volatile uint16_t *  data_ptr,
uint8_t *  result_ptr,
const uint16_t  remaining,
const uint16_t  nbytes,
const uint16_t  onemark,
const uint32_t  onespace,
const uint16_t  zeromark,
const uint32_t  zerospace,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess,
const bool  MSBfirst = true,
const bool  expectlastspace = true 
)
private

Match & decode the typical data section of an IR message. The bytes are stored at result_ptr. The first byte in the result equates to the first byte encountered, and so on.

Parameters
[in]data_ptrA pointer to where we are at in the capture buffer.
[out]result_ptrA ptr to where to start storing the bytes we decoded.
[in]remainingThe size of the capture buffer remaining.
[in]nbytesNr. of data bytes we expect.
[in]onemarkNr. of uSeconds in an expected mark signal for a '1' bit.
[in]onespaceNr. of uSecs in an expected space signal for a '1' bit.
[in]zeromarkNr. of uSecs in an expected mark signal for a '0' bit.
[in]zerospaceNr. of uSecs in an expected space signal for a '0' bit.
[in]tolerancePercentage error margin to allow. (Default: kUseDefTol)
[in]excessNr. of uSeconds. (Def: kMarkExcess)
[in]MSBfirstBit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First
[in]expectlastspaceDo we expect a space at the end of the message?
Returns
If successful, how many buffer entries were used. Otherwise 0.

◆ matchData()

match_result_t IRrecv::matchData ( volatile uint16_t *  data_ptr,
const uint16_t  nbits,
const uint16_t  onemark,
const uint32_t  onespace,
const uint16_t  zeromark,
const uint32_t  zerospace,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess,
const bool  MSBfirst = true,
const bool  expectlastspace = true 
)
private

Match & decode the typical data section of an IR message. The data value is stored in the least significant bits reguardless of the bit ordering requested.

Parameters
[in]data_ptrA pointer to where we are at in the capture buffer.
[in]nbitsNr. of data bits we expect.
[in]onemarkNr. of uSeconds in an expected mark signal for a '1' bit.
[in]onespaceNr. of uSecs in an expected space signal for a '1' bit.
[in]zeromarkNr. of uSecs in an expected mark signal for a '0' bit.
[in]zerospaceNr. of uSecs in an expected space signal for a '0' bit.
[in]tolerancePercentage error margin to allow. (Default: kUseDefTol)
[in]excessNr. of uSeconds. (Def: kMarkExcess)
[in]MSBfirstBit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First
[in]expectlastspaceDo we expect a space at the end of the message?
Returns
A match_result_t structure containing the success (or not), the data value, and how many buffer entries were used.

◆ matchGeneric() [1/2]

uint16_t IRrecv::matchGeneric ( volatile uint16_t *  data_ptr,
uint64_t *  result_ptr,
const uint16_t  remaining,
const uint16_t  nbits,
const uint16_t  hdrmark,
const uint32_t  hdrspace,
const uint16_t  onemark,
const uint32_t  onespace,
const uint16_t  zeromark,
const uint32_t  zerospace,
const uint16_t  footermark,
const uint32_t  footerspace,
const bool  atleast = false,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess,
const bool  MSBfirst = true 
)
private

Match & decode a generic/typical <= 64bit IR message. The data is stored at result_ptr.

Note
Values of 0 for hdrmark, hdrspace, footermark, or footerspace mean skip that requirement.
Parameters
[in]data_ptrA pointer to where we are at in the capture buffer.
[out]result_ptrA ptr to where to start storing the bits we decoded.
[in]remainingThe size of the capture buffer remaining.
[in]nbitsNr. of data bits we expect.
[in]hdrmarkNr. of uSeconds for the expected header mark signal.
[in]hdrspaceNr. of uSeconds for the expected header space signal.
[in]onemarkNr. of uSeconds in an expected mark signal for a '1' bit.
[in]onespaceNr. of uSecs in an expected space signal for a '1' bit.
[in]zeromarkNr. of uSecs in an expected mark signal for a '0' bit.
[in]zerospaceNr. of uSecs in an expected space signal for a '0' bit.
[in]footermarkNr. of uSeconds for the expected footer mark signal.
[in]footerspaceNr. of uSeconds for the expected footer space/gap signal.
[in]atleastIs the match on the footerspace a matchAtLeast or matchSpace?
[in]tolerancePercentage error margin to allow. (Default: kUseDefTol)
[in]excessNr. of uSeconds. (Def: kMarkExcess)
[in]MSBfirstBit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First
Returns
If successful, how many buffer entries were used. Otherwise 0.

◆ matchGeneric() [2/2]

uint16_t IRrecv::matchGeneric ( volatile uint16_t *  data_ptr,
uint8_t *  result_ptr,
const uint16_t  remaining,
const uint16_t  nbits,
const uint16_t  hdrmark,
const uint32_t  hdrspace,
const uint16_t  onemark,
const uint32_t  onespace,
const uint16_t  zeromark,
const uint32_t  zerospace,
const uint16_t  footermark,
const uint32_t  footerspace,
const bool  atleast = false,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess,
const bool  MSBfirst = true 
)
private

Match & decode a generic/typical > 64bit IR message. The bytes are stored at result_ptr. The first byte in the result equates to the first byte encountered, and so on.

Note
Values of 0 for hdrmark, hdrspace, footermark, or footerspace mean skip that requirement.
Parameters
[in]data_ptrA pointer to where we are at in the capture buffer.
[out]result_ptrA ptr to where to start storing the bytes we decoded.
[in]remainingThe size of the capture buffer remaining.
[in]nbitsNr. of data bits we expect.
[in]hdrmarkNr. of uSeconds for the expected header mark signal.
[in]hdrspaceNr. of uSeconds for the expected header space signal.
[in]onemarkNr. of uSeconds in an expected mark signal for a '1' bit.
[in]onespaceNr. of uSecs in an expected space signal for a '1' bit.
[in]zeromarkNr. of uSecs in an expected mark signal for a '0' bit.
[in]zerospaceNr. of uSecs in an expected space signal for a '0' bit.
[in]footermarkNr. of uSeconds for the expected footer mark signal.
[in]footerspaceNr. of uSeconds for the expected footer space/gap signal.
[in]atleastIs the match on the footerspace a matchAtLeast or matchSpace?
[in]tolerancePercentage error margin to allow. (Default: kUseDefTol)
[in]excessNr. of uSeconds. (Def: kMarkExcess)
[in]MSBfirstBit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First
Returns
If successful, how many buffer entries were used. Otherwise 0.

◆ matchGenericConstBitTime()

uint16_t IRrecv::matchGenericConstBitTime ( volatile uint16_t *  data_ptr,
uint64_t *  result_ptr,
const uint16_t  remaining,
const uint16_t  nbits,
const uint16_t  hdrmark,
const uint32_t  hdrspace,
const uint16_t  one,
const uint32_t  zero,
const uint16_t  footermark,
const uint32_t  footerspace,
const bool  atleast = false,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess,
const bool  MSBfirst = true 
)
private

Match & decode a generic/typical constant bit time <= 64bit IR message. The data is stored at result_ptr.

Note
Values of 0 for hdrmark, hdrspace, footermark, or footerspace mean skip that requirement.
Parameters
[in]data_ptrA pointer to where we are at in the capture buffer.
Note
data_ptr is assumed to be pointing to a "Mark", not a "Space".
Parameters
[out]result_ptrA ptr to where to start storing the bits we decoded.
[in]remainingThe size of the capture buffer remaining.
[in]nbitsNr. of data bits we expect.
[in]hdrmarkNr. of uSeconds for the expected header mark signal.
[in]hdrspaceNr. of uSeconds for the expected header space signal.
[in]oneNr. of uSeconds in an expected mark signal for a '1' bit.
[in]zeroNr. of uSeconds in an expected mark signal for a '0' bit.
[in]footermarkNr. of uSeconds for the expected footer mark signal.
[in]footerspaceNr. of uSeconds for the expected footer space/gap signal.
[in]atleastIs the match on the footerspace a matchAtLeast or matchSpace?
[in]tolerancePercentage error margin to allow. (Default: kUseDefTol)
[in]excessNr. of uSeconds. (Def: kMarkExcess)
[in]MSBfirstBit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First
Returns
If successful, how many buffer entries were used. Otherwise 0.
Note
Parameters one + zero add up to the total time for a bit. e.g. mark(one) + space(zero) is a 1, mark(zero) + space(one) is a 0.

◆ matchManchester()

uint16_t IRrecv::matchManchester ( volatile const uint16_t *  data_ptr,
uint64_t *  result_ptr,
const uint16_t  remaining,
const uint16_t  nbits,
const uint16_t  hdrmark,
const uint32_t  hdrspace,
const uint16_t  half_period,
const uint16_t  footermark,
const uint32_t  footerspace,
const bool  atleast = false,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess,
const bool  MSBfirst = true,
const bool  GEThomas = true 
)
private

Match & decode a Manchester Code <= 64bit IR message. The data is stored at result_ptr.

Note
Values of 0 for hdrmark, hdrspace, footermark, or footerspace mean skip that requirement.
Parameters
[in]data_ptrA pointer to where we are at in the capture buffer.
Note
data_ptr is assumed to be pointing to a "Mark", not a "Space".
Parameters
[out]result_ptrA ptr to where to start storing the bits we decoded.
[in]remainingThe size of the capture buffer remaining.
[in]nbitsNr. of data bits we expect.
[in]hdrmarkNr. of uSeconds for the expected header mark signal.
[in]hdrspaceNr. of uSeconds for the expected header space signal.
[in]half_periodNr. of uSeconds for half the clock's period. i.e. 1/2 wavelength
[in]footermarkNr. of uSeconds for the expected footer mark signal.
[in]footerspaceNr. of uSeconds for the expected footer space/gap signal.
[in]atleastIs the match on the footerspace a matchAtLeast or matchSpace?
[in]tolerancePercentage error margin to allow. (Default: kUseDefTol)
[in]excessNr. of uSeconds. (Def: kMarkExcess)
[in]MSBfirstBit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First
[in]GEThomasUse G.E. Thomas (true) or IEEE 802.3 (false) convention?
Returns
If successful, how many buffer entries were used. Otherwise 0.
See also
https://en.wikipedia.org/wiki/Manchester_code
http://ww1.microchip.com/downloads/en/AppNotes/Atmel-9164-Manchester-Coding-Basics_Application-Note.pdf

◆ matchManchesterData()

uint16_t IRrecv::matchManchesterData ( volatile const uint16_t *  data_ptr,
uint64_t *  result_ptr,
const uint16_t  remaining,
const uint16_t  nbits,
const uint16_t  half_period,
const uint16_t  starting_balance = 0,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess,
const bool  MSBfirst = true,
const bool  GEThomas = true 
)
private

Match & decode a Manchester Code data (<= 64bits.

Parameters
[in]data_ptrA pointer to where we are at in the capture buffer.
Note
data_ptr is assumed to be pointing to a "Mark", not a "Space".
Parameters
[out]result_ptrA ptr to where to start storing the bits we decoded.
[in]remainingThe size of the capture buffer remaining.
[in]nbitsNr. of data bits we expect.
[in]half_periodNr. of uSeconds for half the clock's period. i.e. 1/2 wavelength
[in]tolerancePercentage error margin to allow. (Default: kUseDefTol)
[in]starting_balanceAmount of uSeconds to assume exists prior to the current value pointed too.
[in]excessNr. of uSeconds. (Def: kMarkExcess)
[in]MSBfirstBit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First
[in]GEThomasUse G.E. Thomas (true) or IEEE 802.3 (false) convention?
Returns
If successful, how many buffer entries were used. Otherwise 0.
See also
https://en.wikipedia.org/wiki/Manchester_code
http://ww1.microchip.com/downloads/en/AppNotes/Atmel-9164-Manchester-Coding-Basics_Application-Note.pdf
Todo:
Clean up and optimise this. It is just "get it working code" atm.

◆ matchMark()

bool IRrecv::matchMark ( const uint32_t  measured,
const uint32_t  desired,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess 
)

Check if we match a mark signal(measured) with the desired within +/-tolerance percent, after an expected is excess is added.

Parameters
[in]measuredThe recorded period of the signal pulse.
[in]desiredThe expected period (in usecs) we are matching against.
[in]toleranceA percentage expressed as an integer. e.g. 10 is 10%.
[in]excessA non-scaling amount to reduce usecs by.
Returns
A Boolean. true if it matches, false if it doesn't.

◆ matchSpace()

bool IRrecv::matchSpace ( const uint32_t  measured,
const uint32_t  desired,
const uint8_t  tolerance = kUseDefTol,
const int16_t  excess = kMarkExcess 
)

Check if we match a space signal(measured) with the desired within +/-tolerance percent, after an expected is excess is removed.

Parameters
[in]measuredThe recorded period of the signal pulse.
[in]desiredThe expected period (in usecs) we are matching against.
[in]toleranceA percentage expressed as an integer. e.g. 10 is 10%.
[in]excessA non-scaling amount to reduce usecs by.
Returns
A Boolean. true if it matches, false if it doesn't.

◆ resume()

void IRrecv::resume ( void  )

Resume collection of received IR data.

Note
This is required if decode() is successful and save_buffer was not set when the class was instanciated.
See also
IRrecv class constructor

◆ setTolerance()

void IRrecv::setTolerance ( const uint8_t  percent = kTolerance)

Set the base tolerance percentage for matching incoming IR messages.

Parameters
[in]percentAn integer percentage. (0-100)

◆ setUnknownThreshold()

void IRrecv::setUnknownThreshold ( const uint16_t  length)

Set the minimum length we will consider for reporting UNKNOWN message types.

Parameters
[in]lengthMin nr. of mark/space pulses required to be considered.

◆ ticksHigh()

uint32_t IRrecv::ticksHigh ( const uint32_t  usecs,
const uint8_t  tolerance = kUseDefTol,
const uint16_t  delta = 0 
)
private

Calculate the upper bound of the nr. of ticks.

Parameters
[in]usecsNr. of uSeconds.
[in]tolerancePercent as an integer. e.g. 10 is 10%
[in]deltaA non-scaling amount to increase usecs by.
Returns
Nr. of ticks.

◆ ticksLow()

uint32_t IRrecv::ticksLow ( const uint32_t  usecs,
const uint8_t  tolerance = kUseDefTol,
const uint16_t  delta = 0 
)
private

Calculate the lower bound of the nr. of ticks.

Parameters
[in]usecsNr. of uSeconds.
[in]tolerancePercent as an integer. e.g. 10 is 10%
[in]deltaA non-scaling amount to reduce usecs by.
Returns
Nr. of ticks.

Member Data Documentation

◆ _timer_num

uint8_t IRrecv::_timer_num
private

◆ _tolerance

uint8_t IRrecv::_tolerance
private

◆ _unknown_threshold

uint16_t IRrecv::_unknown_threshold
private

◆ irparams_save

irparams_t* IRrecv::irparams_save
private

The documentation for this class was generated from the following files: