]> sigrok.org Git - libsigrokdecode.git/commit
uart: don't re-calculate in-frame bit position, just count the bits
authorGerhard Sittig <redacted>
Fri, 22 Apr 2022 20:45:06 +0000 (22:45 +0200)
committerGerhard Sittig <redacted>
Sat, 23 Apr 2022 18:06:30 +0000 (20:06 +0200)
commite556e1168af7027df08622ecfe11309811249e81
tree71fd8f18ba80740a526f863a391236388b56c020
parent1fc5b8a515eb06e759e109728b6f18ccdef0c686
uart: don't re-calculate in-frame bit position, just count the bits

The .get_wait_cond() routine kept re-calculating the current bit index
in the currently inspected UART frame. Just count the bits instead as
they are seen/taken. This eliminates redundant complex logic which had
hard to track down issues in past revisions. Increases robustness, and
improves maintainability.
decoders/uart/pd.py