diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2018-10-21 19:28:31 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2018-10-21 19:28:31 +0200 |
commit | b1e3616dd1b30c8c298c00728647bb72fc3c2c5a (patch) | |
tree | 69c17551ad79bbd2bbdb2d9dc475dd209bf4fef1 /decoders/lin | |
parent | fe9160d567fbb4c890ac7b8bc2e1f2f9143f0935 (diff) | |
download | libsigrokdecode-b1e3616dd1b30c8c298c00728647bb72fc3c2c5a.tar.gz libsigrokdecode-b1e3616dd1b30c8c298c00728647bb72fc3c2c5a.zip |
lin: Simplify LinFsm._transition_allowed().
Diffstat (limited to 'decoders/lin')
-rw-r--r-- | decoders/lin/pd.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/decoders/lin/pd.py b/decoders/lin/pd.py index d1c1481..e82acf4 100644 --- a/decoders/lin/pd.py +++ b/decoders/lin/pd.py @@ -37,10 +37,7 @@ class LinFsm: def _transition_allowed(self, target_state): if target_state == LinFsm.State.Error: return True - for s in self.allowed_state[self.state]: - if s == target_state: - return True - return False + return target_state in self.allowed_state[self.state] def reset(self): self.state = LinFsm.State.WaitForBreak |