41 uint32_t us = (now - m_start);
45 if (m_sample !=
NULL) m_sample[m_ix] = us;
50 if (m_ix > 1 && m_ix < m_max - 2)
51 m_code = (m_code << 1) + (us > m_threshold);
54 if (++m_ix != m_max)
return;
83 for (uint8_t i = 0; i < m_keys; i++)
84 if (code == pgm_read_word(&m_keymap[i].code))
85 return (pgm_read_word(&m_keymap[i].key));
92 for (uint8_t ix = 0; ix < receiver.m_ix; ix++)
93 outs << ix <<
':' << receiver.m_sample[ix] <<
endl;
virtual void on_interrupt(uint16_t arg=0)
int32_t expire_after() const
int lookup(uint16_t code)
friend IOStream & operator<<(IOStream &outs, Receiver &receiver)
IOStream & endl(IOStream &outs)
static bool push(uint8_t type, Handler *target, uint16_t value=0)