40 return durationData[i];
69 bool searchForStart();
73 void recordDuration(
unsigned long t);
uint16_t microseconds_t
Type for durations in micro seconds.
uint16_t milliseconds_t
Type for durations in milli seconds.
uint8_t pin_t
Type for GPIO pin, compatible with Arduino libs.
static constexpr size_t defaultCaptureLength
int16_t markExcess
Microseconds subtracted from pulses and added to gaps.
milliseconds_t beginningTimeout
static constexpr milliseconds_t defaultEndingTimeout
static constexpr milliseconds_t defaultBeginningTimeout
virtual bool isEmpty() const
milliseconds_t endingTimeout
bool timeouted
True if last receive ended with a timeout.
An implementation of IrReceiver using polling of the input pin.
bool isReady() const
Returns true if there is collected data.
microseconds_t getDuration(unsigned int i) const
Returns the index-th duration, if possible.
void disable()
Stop reception of IR data.
void setBeginningTimeout(milliseconds_t timeOut)
void enable()
In this class, enable does the actual collection of the data.
milliseconds_t getBeginningTimeout() const
size_t getDataLength() const
Returns the number of collected durations.
milliseconds_t getEndingTimeout() const
void setEndingTimeout(milliseconds_t timeOut)
Abstract base class for demodulating IR receivers.
static constexpr microseconds_t defaultMarkExcess
static constexpr pin_t defaultPin