Skip to content

How it is worked "String resultToSourceCode(const decode_results * const results)" #1459

Answered by crankyoldgit
MarkEvens asked this question in Q&A
Discussion options

You must be logged in to vote

why this start from 1 instead of 0.

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.

And why 'kRawTick' default is 2 ?

Because is rawbuf[] is array of uint16_t to save space. Moving to uint32_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 …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MarkEvens
Comment options

Answer selected by crankyoldgit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants