mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
Decoder Update : can put error when Bit Stuffing error(111111 or 000000)
This commit is contained in:
parent
d17440a862
commit
974c336cdb
@ -21,6 +21,7 @@
|
||||
|
||||
##
|
||||
## 2024/3/28 DreamSourceLab : Display data when zooming out
|
||||
## 2024/6/18 DreamSourceLab : put error when stuff error
|
||||
##
|
||||
|
||||
from common.srdhelper import bitpack_msb
|
||||
@ -154,6 +155,8 @@ class Decoder(srd.Decoder):
|
||||
if len(self.bits) > self.last_databit + 17:
|
||||
return False
|
||||
last_6_bits = self.rawbits[-6:]
|
||||
if last_6_bits in ([1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0]):
|
||||
self.putx([16, ['Stuff Error' ,'Error','E']])
|
||||
if last_6_bits not in ([0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 0]):
|
||||
return False
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user