seven_segment: cosmetics in decode(), reduce redundancy
commit88b62601d661281be74fde8e3913e66dbe2fa7b4
authorGerhard Sittig <gerhard.sittig@gmx.net>
Wed, 13 Jan 2021 19:12:07 +0000 (13 20:12 +0100)
committerGerhard Sittig <gerhard.sittig@gmx.net>
Wed, 13 Jan 2021 19:25:09 +0000 (13 20:25 +0100)
tree9d92c75445db963e3a9cbf976951063dd2fc5670
parent93dd1225b285cdddaf9fc7f0bfa9cd6848595585
seven_segment: cosmetics in decode(), reduce redundancy

"Un-clutter" the decode() routine. Group related instructions to improve
readability. Drop redundant statements where common code can handle all
cases. Also fixes an unconditional access to the optional decimal point
input signal (which had caused a runtime error, and ceased decoding).
decoders/seven_segment/pd.py