summaryrefslogtreecommitdiff
path: root/decoders/ir_sirc
AgeCommit message (Collapse)Author
2020-07-26ir_sirc: use common bitpack() variant with array accessGerhard Sittig
This eliminates array copies and indexed access to bit values in the calling decoder. Prefer common helpers instead.
2020-07-22ir_sirc: minor Python and other nitsGerhard Sittig
The .wait() wrapper always receives Python lists. There is only a single IR pin (and its value isn't even used anywhere because appropriate edge conditions get constructed). There is a delicate ss/es detail in the .decode() routine concerning the IR frame's annotation's start. Don't "continue" in the loop body's last statement, just "pass" and continue.
2020-07-22ir_sirc: symbolic names for IR pulse widths, more line trimmingGerhard Sittig
Concentrate the magic numbers for IR pulse widths at the top of the source file. Drop more unused variables. Rename others to shorten more text lines.
2020-07-22ir_sirc: use symbolic identifiers for annotation classesGerhard Sittig
2020-07-22ir_sirc: reduce smarts to improve maintenance (.wait() API change)Gerhard Sittig
Eliminate redundancy in time to snum conversions and vice versa. Don't locally overload .wait() with unexpected semantics and neither change its parameters nor return values. Give reviewers and maintainers a chance to see what's happening when they inspect call sites. The 'signals' identifier is unusual for pin states, use the more common 'pins' instead for consistency with other decoders. Reflect when return values are not used, so that readers need to juggle fewer details in their head.
2020-07-22ir_sirc: use ss/es for consistency with other decodersGerhard Sittig
2020-07-22ir_sirc: .put() nits, common helpers, whitespaceGerhard Sittig
Wrap the .put() routine which eliminates redundancy and shortens a few code lines. Vertically align text variants for different zoom levels. Prefer common helpers for bit accumulation which eliminates a local copy of that feature. Address minor whitespace nits, alpha-sort imports.
2020-07-22ir_sirc: fixup decoder boilerplateGerhard Sittig
The SIRC decoder was written to an older API, and failed to load in a recent environment (tag missing, ambiguous annotation names). Unbreak the decoder's boilerplate, and address other nits while we are here: There is no Python output. Use the same declaration syntax as in other decoders for improved maintenance (greppability). Call reset() from __init__() to avoid surprises when a future version does have vars. Do provide a doc string in the module initialization, to keep the URL for the protocol description at hand.
2020-07-22ir_sirc: introduce decoder for Sony IR remote control protocolTom Flanagan