2
0
forked from Ivasoft/DSView

Merge pull request #648 from yunyaobaihong/demo

can & can-fd DLC does not prompt warnings
This commit is contained in:
dreamsourcelabTAI
2023-06-16 18:20:47 +08:00
committed by GitHub
2 changed files with 0 additions and 4 deletions

View File

@@ -439,12 +439,10 @@ class Decoder(srd.Decoder):
self.last_databit = self.dlc_start + 3 + (dlc2len(self.dlc) * 8)
#if rtr == remote then dlc = 0
if self.dlc != 0 and self.rtr_type == 'remote':
self.putb([16, ['Data length code (DLC) != 0 is not allowed']])
self.dlc = 0
self.last_databit = self.dlc_start + 3 + (dlc2len(self.dlc) * 8)
#if dlc > 8 then dlc = 8
elif self.dlc > 8 and not self.fd:
self.putb([16, ['Data length code (DLC) > 8 is not allowed']])
self.dlc = 8
self.last_databit = self.dlc_start + 3 + (dlc2len(self.dlc) * 8)

View File

@@ -342,12 +342,10 @@ class Decoder(srd.Decoder):
self.last_databit = self.dlc_start + 3 + (dlc2len(self.dlc) * 8)
#if rtr == remote then dlc = 0
if self.dlc != 0 and self.rtr_type == 'remote':
self.putb([16, ['Data length code (DLC) != 0 is not allowed']])
self.dlc = 0
self.last_databit = self.dlc_start + 3 + (dlc2len(self.dlc) * 8)
#if dlc > 8 then dlc = 8
elif self.dlc > 8:
self.putb([16, ['Data length code (DLC) > 8 is not allowed']])
self.dlc = 8
self.last_databit = self.dlc_start + 3 + (dlc2len(self.dlc) * 8)