mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-23 13:42:55 +08:00
fix: lin protocol can't output
This commit is contained in:
parent
b26c5cfeee
commit
b0d811604b
@ -90,6 +90,7 @@ class Decoder(srd.Decoder):
|
||||
self.out_ann = None
|
||||
self.ss_block = None
|
||||
self.es_block = None
|
||||
self.done_break = False
|
||||
|
||||
def start(self):
|
||||
self.out_ann = self.register(srd.OUTPUT_ANN)
|
||||
@ -124,7 +125,7 @@ class Decoder(srd.Decoder):
|
||||
|
||||
self.fsm.reset()
|
||||
self.fsm.transit(LinFsm.State.Sync)
|
||||
|
||||
self.done_break = True
|
||||
self.putx([1, ['Break condition', 'Break', 'Brk', 'B']])
|
||||
|
||||
def handle_sync(self, value):
|
||||
@ -211,6 +212,10 @@ class Decoder(srd.Decoder):
|
||||
|
||||
return (p0 << 0) | (p1 << 1)
|
||||
|
||||
def end(self):
|
||||
if self.done_break and len(self.lin_rsp):
|
||||
self.handle_checksum();
|
||||
|
||||
def decode(self, ss, es, data):
|
||||
ptype, rxtx, pdata = data
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user