mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-02-02 13:52:55 +08:00
Merge pull request #783 from yunyaobaihong/master
Decoder Update : can put error when Bit Stuffing error(111111 or 000000)
This commit is contained in:
commit
799f6eea4e
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
##
|
##
|
||||||
## 2024/3/28 DreamSourceLab : Display data when zooming out
|
## 2024/3/28 DreamSourceLab : Display data when zooming out
|
||||||
|
## 2024/6/18 DreamSourceLab : put error when stuff error
|
||||||
##
|
##
|
||||||
|
|
||||||
from common.srdhelper import bitpack_msb
|
from common.srdhelper import bitpack_msb
|
||||||
@ -154,6 +155,8 @@ class Decoder(srd.Decoder):
|
|||||||
if len(self.bits) > self.last_databit + 17:
|
if len(self.bits) > self.last_databit + 17:
|
||||||
return False
|
return False
|
||||||
last_6_bits = self.rawbits[-6:]
|
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]):
|
if last_6_bits not in ([0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 0]):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user