IRremoteESP8266
|
Class for receiving IR messages. More...
#include <IRrecv.h>
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_t * | irparams_save |
uint8_t | _tolerance |
uint8_t | _timer_num |
uint16_t | _unknown_threshold |
Class for receiving IR messages.
|
explicit |
Class constructor Args:
[in] | recvpin | The GPIO pin the IR receiver module's data pin is connected to. |
[in] | bufsize | Nr. of entries to have in the capture buffer. (Default: kRawBuf) |
[in] | timeout | Nr. of milli-Seconds of no signal before we stop capturing data. (Default: kTimeoutMs) |
[in] | save_buffer | Use a second (save) buffer to decode from. (Default: false) |
[in] | timer_num | Nr. of the ESP32 timer to use (0 to 3) (ESP32 Only) |
|
explicit |
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.
|
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
.
[in] | data_ptr | A pointer to where we are at in the capture buffer. |
[out] | result_bits_ptr | A pointer to where to start storing the bits we decoded. |
[out] | result_bytes_ptr | A pointer to where to start storing the bytes we decoded. |
[in] | use_bits | A flag indicating if we are to decode bits or bytes. |
[in] | remaining | The size of the capture buffer remaining. |
[in] | nbits | Nr. of data bits we expect. |
[in] | hdrmark | Nr. of uSeconds for the expected header mark signal. |
[in] | hdrspace | Nr. of uSeconds for the expected header space signal. |
[in] | onemark | Nr. of uSeconds in an expected mark signal for a '1' bit. |
[in] | onespace | Nr. of uSecs in an expected space signal for a '1' bit. |
[in] | zeromark | Nr. of uSecs in an expected mark signal for a '0' bit. |
[in] | zerospace | Nr. of uSecs in an expected space signal for a '0' bit. |
[in] | footermark | Nr. of uSeconds for the expected footer mark signal. |
[in] | footerspace | Nr. of uSeconds for the expected footer space/gap signal. |
[in] | atleast | Is the match on the footerspace a matchAtLeast or matchSpace? |
[in] | tolerance | Percentage error margin to allow. (Default: kUseDefTol) |
[in] | excess | Nr. of uSeconds. (Def: kMarkExcess) |
[in] | MSBfirst | Bit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First |
|
private |
Convert the tolerance percentage into something valid.
[in] | percentage | An integer percentage. |
|
private |
Compare two tick values.
[in] | oldval | Nr. of ticks. |
[in] | newval | Nr. of ticks. |
|
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.
[in] | src | Pointer to an irparams_t structure to copy from. |
[out] | dst | Pointer to an irparams_t structure to copy to. |
|
private |
Remove or merge pulses in the capture buffer that are too short.
[in,out] | results | Ptr to the decode_results we are going to filter. |
[in] | floor | Only allow values in the buffer large than this. (in microSeconds) |
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.
[out] | results | A PTR to where the decoded IR message will be stored. |
[out] | save | A PTR to an irparams_t instance in which to save the interrupt's memory/state. NULL means don't save it. |
[in] | max_skip | Maximum 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.) |
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. [in] | noise_floor | Pulses 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!) |
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!!
|
private |
Decode the supplied Airwell "Manchester code" message.
Status: BETA / Appears to be working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Aiwa RC T501 message. Status: BETA / Should work.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Amcor HVAC message. Status: STABLE / Reported as working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Argo message. Status: BETA / Probably works.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Carrier HVAC message.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
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.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Carrier 64-bit HVAC message. Status: STABLE / Known to be working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Coolix A/C message. Status: STABLE / Known Working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied CoronaAc message. Status: STABLE / Appears to be working.
[in,out] | results | Ptr to the data to decode & where to store it |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Daikin 280-bit message. (DAIKIN) Status: STABLE / Reported as working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Daikin 128-bit message. (DAIKIN128) Status: STABLE / Known Working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Daikin 152-bit message. (DAIKIN152) Status: STABLE / Known Working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Daikin 160-bit message. (DAIKIN160) Status: STABLE / Confirmed working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Daikin 176-bit message. (DAIKIN176) Status: STABLE / Expected to work.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Daikin 312-bit message. (DAIKIN2) Status: STABLE / Works as expected.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Daikin 216-bit message. (DAIKIN216) Status: STABLE / Should be working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Daikin 64-bit message. (DAIKIN64) Status: Beta / Probably Working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Delonghi A/C message. Status: STABLE / Expected to be working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Delonghi A/C message. Status: STABLE / Should work fine.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied DISH NETWORK message. Status: ALPHA (untested and unconfirmed.)
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Doshisha message. Status: STABLE / Works on real device.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied EcoClim A/C message. Status: STABLE / Confirmed working on real remote.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Electra A/C message. Status: STABLE / Known working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Elite Screens message. Status: STABLE / Confirmed working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Epson message. Status: Beta / Probably works.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Fujitsu AC IR message if possible. Status: STABLE / Working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied G.I. Cable message. Status: Alpha / Not tested against a real device.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Goodweather message. Status: BETA / Probably works.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Gree HVAC message. Status: STABLE / Working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Haier HSU07-HEA03 remote message. Status: STABLE / Known to be working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Haier YR-W02 remote A/C message. Status: BETA / Appears to be working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
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.
|
private |
Decode the supplied Hitachi A/C message. Status: STABLE / Expected to work.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. Typically kHitachiAcBits, kHitachiAc1Bits, kHitachiAc2Bits, kHitachiAc344Bits |
[in] | strict | Flag indicating if we should perform strict matching. |
[in] | MSBfirst | Is the data per byte stored in MSB First (true) or LSB First order(false)? |
|
private |
|
private |
Decode the supplied Hitachi 15to27-byte/120to216-bit A/C message. Status: STABLE / Works fine.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Hitachi 53-byte/424-bit A/C message. Status: STABLE / Reported as working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Inax Toilet message. Status: Stable / Known working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied JVC message. Status: Stable / Known working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Kelvinator message. Status: STABLE / Known working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Lasertag message. Status: BETA / Appears to be working 90% of the time.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
matchManchester()
if we can.
|
private |
Decode the supplied LEGO Power Functions message. Status: STABLE / Appears to work.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied LG message. Status: STABLE / Working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. Typically kLgBits or kLg32Bits. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Lutron message. Status: STABLE / Working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied MagiQuest message. Status: Beta / Should work.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Metz message. Status: BETA / Probably works.
[in,out] | results | Ptr to the data to decode & where to store the decode |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Midea message. Status: Alpha / Needs testing against a real device.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. Typically kHitachiAcBits, kHitachiAc1Bits, kHitachiAc2Bits, kHitachiAc344Bits |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Midea24 message. Status: STABLE / Confirmed working on a real device.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied MilesTag2 message. Status: ALPHA / Probably works but needs testing with a real device.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Mirage message. Status: STABLE / Reported as working.
[in,out] | results | Ptr to the data to decode & where to store the decode |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Mitsubishi 16-bit message. Status: STABLE / Working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Mitsubishi/TCL 112-bit A/C message. (MITSUBISHI112, TCL112AC) Status: STABLE / Reported as working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Mitsubishi 136-bit A/C message. (MITSUBISHI136) Status: STABLE / Reported as working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied second variation of a Mitsubishi 16-bit message. Status: STABLE / Working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Mitsubish 144-bit A/C message. Status: BETA / Probably works.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Mitsubishi Heavy Industries A/C message. Status: BETA / Appears to be working. Needs testing against a real device.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. Typically kMitsubishiHeavy88Bits or kMitsubishiHeavy152Bits (def). |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the Multibrackets message. Status: BETA / Appears to be working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied MWM message. Status: Implemented.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied NEC (Renesas) message. Status: STABLE / Known good.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Neoclima message. Status: STABLE / Known working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Nikai message. Status: STABLE / Working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Panasonic message. Status: STABLE / Should be working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | manufacturer | A 16-bit manufacturer code. e.g. 0x4004 is Panasonic |
[in] | strict | Flag indicating if we should perform strict matching. |
sendPanasonic64()
, not sendPanasonic()
.
|
private |
Decode the supplied Panasonic AC message. Status: STABLE / Works with real device(s).
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Panasonic AC 32/16bit message. Status: STABLE / Confirmed working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. Typically: kPanasonicAc32Bits or kPanasonicAc32Bits/2 |
[in] | strict | Flag indicating if we should perform strict matching. |
So each long version really only has 32 unique bits, and the short version really only has 16 unique bits.
|
private |
Decode the supplied Pioneer message. Status: STABLE / Should be working. (Self decodes & real examples)
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied RC-5/RC5X message. Status: RC-5 (stable), RC-5X (alpha)
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied RC6 message. Status: Stable.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode a Philips RC-MM packet (between 12 & 32 bits) if possible. Status: STABLE / Should be working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Samsung 32-bit message. Status: STABLE.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Samsung36 message. Status: STABLE / Expected to work.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Samsung A/C message. Status: Stable / Known to be working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied SanyoAc message. Status: STABLE / Reported as working.
[in,out] | results | Ptr to the data to decode & where to store the decode |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied SANYO LC7461 message. Status: BETA / Probably works.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Sharp message. Status: STABLE / Working fine.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
[in] | expansion | Should we expect the expansion bit to be set. Default is true. |
sendSharpRaw()
.
|
private |
Decode the supplied Sharp A/C message. Status: STABLE / Known working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Sony/SIRC message. Status: STABLE / Should be working. strict mode is ALPHA / Untested.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Symphony packet/message. Status: STABLE / Should be working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Status: STABLE / Reported as working on a real device.
[in,out] | results | Ptr to data to decode & where to store the decode |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect (kTechnibelAcBits). |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Teco message. Status: STABLE / Tested.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Toshiba A/C message. Status: STABLE / Working.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Transcold A/C message. Status: STABLE / Known Working.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Trotec message. Status: STABLE / Works. Untested on real devices.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Vestel message. Status: Alpha / Needs testing against a real device.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Voltas message. Status: STABLE / Working on real device.
[in,out] | results | Ptr to the data to decode & where to store the decode |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Whirlpool A/C message. Status: STABLE / Working as intended.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Whynter message. Status: STABLE / Working. Strict mode is ALPHA.
[in,out] | results | Ptr to the data to decode & where to store the result |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. |
[in] | strict | Flag indicating if we should perform strict matching. |
|
private |
Decode the supplied Zepeal message. Status: STABLE / Works on real device.
[in,out] | results | Ptr to the data to decode & where to store the decode result. |
[in] | offset | The starting index to use when attempting to decode the raw data. Typically/Defaults to kStartOffset. |
[in] | nbits | The number of data bits to expect. Typically kZepealBits. |
[in] | strict | Flag indicating if we should perform strict matching. |
void IRrecv::disableIRIn | ( | void | ) |
Stop collection of any received IR data. Disable any timers and interrupts.
void IRrecv::enableIRIn | ( | const bool | pullup = false | ) |
Set up and (re)start the IR capture mechanism.
[in] | pullup | A flag indicating should the GPIO use the internal pullup resistor. (Default: false . i.e. No.) |
uint16_t IRrecv::getBufSize | ( | void | ) |
Obtain the maximum number of entries possible in the capture buffer. i.e. It's size.
|
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.
[in,out] | results | Ptr to the data to decode and where to store the decode result. |
[in,out] | offset | Ptr to the currect offset to the rawbuf. |
[in,out] | used | Ptr to the current used counter. |
[in] | bitTime | Time interval of single bit in microseconds. |
[in] | tolerance | Percent tolerance to be used in matching. |
[in] | excess | Extra useconds to add to Marks & removed from Spaces. |
[in] | delta | A non-scaling (+/-) error margin (in useconds). |
[in] | maxwidth | Maximum number of successive levels to find in a single level (default is 3) |
uint8_t IRrecv::getTolerance | ( | void | ) |
Get the base tolerance percentage for matching incoming IR messages.
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.
[in] | measured | The recorded period of the signal pulse. |
[in] | desired | The expected period (in usecs) we are matching against. |
[in] | tolerance | A percentage expressed as an integer. e.g. 10 is 10%. |
[in] | delta | A non-scaling (+/-) error margin (in useconds). |
|
private |
Check if we match a pulse(measured) of at least desired within tolerance percent and/or a fixed delta margin.
[in] | measured | The recorded period of the signal pulse. |
[in] | desired | The expected period (in usecs) we are matching against. |
[in] | tolerance | A percentage expressed as an integer. e.g. 10 is 10%. |
[in] | delta | A non-scaling amount to reduce usecs by. |
|
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.
[in] | data_ptr | A pointer to where we are at in the capture buffer. |
[out] | result_ptr | A ptr to where to start storing the bytes we decoded. |
[in] | remaining | The size of the capture buffer remaining. |
[in] | nbytes | Nr. of data bytes we expect. |
[in] | onemark | Nr. of uSeconds in an expected mark signal for a '1' bit. |
[in] | onespace | Nr. of uSecs in an expected space signal for a '1' bit. |
[in] | zeromark | Nr. of uSecs in an expected mark signal for a '0' bit. |
[in] | zerospace | Nr. of uSecs in an expected space signal for a '0' bit. |
[in] | tolerance | Percentage error margin to allow. (Default: kUseDefTol) |
[in] | excess | Nr. of uSeconds. (Def: kMarkExcess) |
[in] | MSBfirst | Bit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First |
[in] | expectlastspace | Do we expect a space at the end of the message? |
|
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.
[in] | data_ptr | A pointer to where we are at in the capture buffer. |
[in] | nbits | Nr. of data bits we expect. |
[in] | onemark | Nr. of uSeconds in an expected mark signal for a '1' bit. |
[in] | onespace | Nr. of uSecs in an expected space signal for a '1' bit. |
[in] | zeromark | Nr. of uSecs in an expected mark signal for a '0' bit. |
[in] | zerospace | Nr. of uSecs in an expected space signal for a '0' bit. |
[in] | tolerance | Percentage error margin to allow. (Default: kUseDefTol) |
[in] | excess | Nr. of uSeconds. (Def: kMarkExcess) |
[in] | MSBfirst | Bit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First |
[in] | expectlastspace | Do we expect a space at the end of the message? |
|
private |
Match & decode a generic/typical <= 64bit IR message. The data is stored at result_ptr.
[in] | data_ptr | A pointer to where we are at in the capture buffer. |
[out] | result_ptr | A ptr to where to start storing the bits we decoded. |
[in] | remaining | The size of the capture buffer remaining. |
[in] | nbits | Nr. of data bits we expect. |
[in] | hdrmark | Nr. of uSeconds for the expected header mark signal. |
[in] | hdrspace | Nr. of uSeconds for the expected header space signal. |
[in] | onemark | Nr. of uSeconds in an expected mark signal for a '1' bit. |
[in] | onespace | Nr. of uSecs in an expected space signal for a '1' bit. |
[in] | zeromark | Nr. of uSecs in an expected mark signal for a '0' bit. |
[in] | zerospace | Nr. of uSecs in an expected space signal for a '0' bit. |
[in] | footermark | Nr. of uSeconds for the expected footer mark signal. |
[in] | footerspace | Nr. of uSeconds for the expected footer space/gap signal. |
[in] | atleast | Is the match on the footerspace a matchAtLeast or matchSpace? |
[in] | tolerance | Percentage error margin to allow. (Default: kUseDefTol) |
[in] | excess | Nr. of uSeconds. (Def: kMarkExcess) |
[in] | MSBfirst | Bit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First |
|
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.
[in] | data_ptr | A pointer to where we are at in the capture buffer. |
[out] | result_ptr | A ptr to where to start storing the bytes we decoded. |
[in] | remaining | The size of the capture buffer remaining. |
[in] | nbits | Nr. of data bits we expect. |
[in] | hdrmark | Nr. of uSeconds for the expected header mark signal. |
[in] | hdrspace | Nr. of uSeconds for the expected header space signal. |
[in] | onemark | Nr. of uSeconds in an expected mark signal for a '1' bit. |
[in] | onespace | Nr. of uSecs in an expected space signal for a '1' bit. |
[in] | zeromark | Nr. of uSecs in an expected mark signal for a '0' bit. |
[in] | zerospace | Nr. of uSecs in an expected space signal for a '0' bit. |
[in] | footermark | Nr. of uSeconds for the expected footer mark signal. |
[in] | footerspace | Nr. of uSeconds for the expected footer space/gap signal. |
[in] | atleast | Is the match on the footerspace a matchAtLeast or matchSpace? |
[in] | tolerance | Percentage error margin to allow. (Default: kUseDefTol) |
[in] | excess | Nr. of uSeconds. (Def: kMarkExcess) |
[in] | MSBfirst | Bit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First |
|
private |
Match & decode a generic/typical constant bit time <= 64bit IR message. The data is stored at result_ptr.
[in] | data_ptr | A pointer to where we are at in the capture buffer. |
data_ptr
is assumed to be pointing to a "Mark", not a "Space". [out] | result_ptr | A ptr to where to start storing the bits we decoded. |
[in] | remaining | The size of the capture buffer remaining. |
[in] | nbits | Nr. of data bits we expect. |
[in] | hdrmark | Nr. of uSeconds for the expected header mark signal. |
[in] | hdrspace | Nr. of uSeconds for the expected header space signal. |
[in] | one | Nr. of uSeconds in an expected mark signal for a '1' bit. |
[in] | zero | Nr. of uSeconds in an expected mark signal for a '0' bit. |
[in] | footermark | Nr. of uSeconds for the expected footer mark signal. |
[in] | footerspace | Nr. of uSeconds for the expected footer space/gap signal. |
[in] | atleast | Is the match on the footerspace a matchAtLeast or matchSpace? |
[in] | tolerance | Percentage error margin to allow. (Default: kUseDefTol) |
[in] | excess | Nr. of uSeconds. (Def: kMarkExcess) |
[in] | MSBfirst | Bit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First |
1
, mark(zero) + space(one) is a 0
.
|
private |
Match & decode a Manchester Code <= 64bit IR message. The data is stored at result_ptr.
[in] | data_ptr | A pointer to where we are at in the capture buffer. |
data_ptr
is assumed to be pointing to a "Mark", not a "Space". [out] | result_ptr | A ptr to where to start storing the bits we decoded. |
[in] | remaining | The size of the capture buffer remaining. |
[in] | nbits | Nr. of data bits we expect. |
[in] | hdrmark | Nr. of uSeconds for the expected header mark signal. |
[in] | hdrspace | Nr. of uSeconds for the expected header space signal. |
[in] | half_period | Nr. of uSeconds for half the clock's period. i.e. 1/2 wavelength |
[in] | footermark | Nr. of uSeconds for the expected footer mark signal. |
[in] | footerspace | Nr. of uSeconds for the expected footer space/gap signal. |
[in] | atleast | Is the match on the footerspace a matchAtLeast or matchSpace? |
[in] | tolerance | Percentage error margin to allow. (Default: kUseDefTol) |
[in] | excess | Nr. of uSeconds. (Def: kMarkExcess) |
[in] | MSBfirst | Bit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First |
[in] | GEThomas | Use G.E. Thomas (true) or IEEE 802.3 (false) convention? |
|
private |
Match & decode a Manchester Code data (<= 64bits.
[in] | data_ptr | A pointer to where we are at in the capture buffer. |
data_ptr
is assumed to be pointing to a "Mark", not a "Space". [out] | result_ptr | A ptr to where to start storing the bits we decoded. |
[in] | remaining | The size of the capture buffer remaining. |
[in] | nbits | Nr. of data bits we expect. |
[in] | half_period | Nr. of uSeconds for half the clock's period. i.e. 1/2 wavelength |
[in] | tolerance | Percentage error margin to allow. (Default: kUseDefTol) |
[in] | starting_balance | Amount of uSeconds to assume exists prior to the current value pointed too. |
[in] | excess | Nr. of uSeconds. (Def: kMarkExcess) |
[in] | MSBfirst | Bit order to save the data in. (Def: true) true is Most Significant Bit First Order, false is Least Significant First |
[in] | GEThomas | Use G.E. Thomas (true) or IEEE 802.3 (false) convention? |
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.
[in] | measured | The recorded period of the signal pulse. |
[in] | desired | The expected period (in usecs) we are matching against. |
[in] | tolerance | A percentage expressed as an integer. e.g. 10 is 10%. |
[in] | excess | A non-scaling amount to reduce usecs by. |
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.
[in] | measured | The recorded period of the signal pulse. |
[in] | desired | The expected period (in usecs) we are matching against. |
[in] | tolerance | A percentage expressed as an integer. e.g. 10 is 10%. |
[in] | excess | A non-scaling amount to reduce usecs by. |
void IRrecv::resume | ( | void | ) |
void IRrecv::setTolerance | ( | const uint8_t | percent = kTolerance | ) |
Set the base tolerance percentage for matching incoming IR messages.
[in] | percent | An integer percentage. (0-100) |
void IRrecv::setUnknownThreshold | ( | const uint16_t | length | ) |
Set the minimum length we will consider for reporting UNKNOWN message types.
[in] | length | Min nr. of mark/space pulses required to be considered. |
|
private |
Calculate the upper bound of the nr. of ticks.
[in] | usecs | Nr. of uSeconds. |
[in] | tolerance | Percent as an integer. e.g. 10 is 10% |
[in] | delta | A non-scaling amount to increase usecs by. |
|
private |
Calculate the lower bound of the nr. of ticks.
[in] | usecs | Nr. of uSeconds. |
[in] | tolerance | Percent as an integer. e.g. 10 is 10% |
[in] | delta | A non-scaling amount to reduce usecs by. |
|
private |
|
private |
|
private |
|
private |