Skip to content

Commit

Permalink
Patch to fix issue with #430
Browse files Browse the repository at this point in the history
  • Loading branch information
fornellas committed Jul 9, 2022
1 parent f9ab0b9 commit 322a7a9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions libsigrokdecode4DSL/decoders/uart/pd.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,17 +559,18 @@ def decode(self):
cond_idle_idx[TX] = len(conds)
conds.append(idle_cond)
(rx, tx) = self.wait(conds)
if cond_data_idx[RX] is not None and self.matched[cond_data_idx[RX]]:

if cond_data_idx[RX] is not None and (self.matched & (0b1 << cond_data_idx[RX])):
self.inspect_sample(RX, rx, inv[RX])
if cond_edge_idx[RX] is not None and self.matched[cond_edge_idx[RX]]:
if cond_edge_idx[RX] is not None and (self.matched & (0b1 << cond_edge_idx[RX])):
self.inspect_edge(RX, rx, inv[RX])
self.inspect_idle(RX, rx, inv[RX])
if cond_idle_idx[RX] is not None and self.matched[cond_idle_idx[RX]]:
if cond_idle_idx[RX] is not None and (self.matched & (0b1 << cond_idle_idx[RX])):
self.inspect_idle(RX, rx, inv[RX])
if cond_data_idx[TX] is not None and self.matched[cond_data_idx[TX]]:
if cond_data_idx[TX] is not None and (self.matched & (0b1 << cond_data_idx[TX])):
self.inspect_sample(TX, tx, inv[TX])
if cond_edge_idx[TX] is not None and self.matched[cond_edge_idx[TX]]:
if cond_edge_idx[TX] is not None and (self.matched & (0b1 << cond_edge_idx[TX])):
self.inspect_edge(TX, tx, inv[TX])
self.inspect_idle(TX, tx, inv[TX])
if cond_idle_idx[TX] is not None and self.matched[cond_idle_idx[TX]]:
if cond_idle_idx[TX] is not None and (self.matched & (0b1 << cond_idle_idx[TX])):
self.inspect_idle(TX, tx, inv[TX])

0 comments on commit 322a7a9

Please sign in to comment.