How it is worked "String resultToSourceCode(const decode_results * const results)" #1459
-
why this start from 1 instead of 0 And why 'kRawTick' default is 2 ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
because
Because is The TL;DR: is it's that value to save half the ram needed for the capture buffer at the slight reduction in timing resolution. The ESP doesn't have heaps of ram, we need to save it where we can. Timing down to 1usec resolution really doesn't matter for IR signals. |
Beta Was this translation helpful? Give feedback.
because
rawbuf[0]
effectively contains junk (e.g. The number of ticks since we started listening for a signal till when we first saw the signal).rawbuf[1]
contains the first useful data of the actual message/signal.Because is
rawbuf[]
is array ofuint16_t
to save space. Moving touint32_t
would cost twice the memory for next to no benefit.A typical mark or space is capped by the
kTimeout
time. i.e. How long do we keep waiting for more of a signal before we give up.That can be between 15ms or up to 90+ms. As we record the timing in
usecs
. that would be 15,000 to 90,000 usecs before the timeout is reached. 65,535 …