X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fuart%2Fpd.py;h=d59c6c33fb3fd5738fc84479ae32df99d7c9fd89;hb=1c49e875623918f8893308307f487a1f551daec4;hp=b8508a72c74b7338e7a1039ce6e265e84badda2c;hpb=4eafeeefc716a617837f1d69c040753b0b8d71f7;p=libsigrokdecode.git diff --git a/decoders/uart/pd.py b/decoders/uart/pd.py index b8508a7..d59c6c3 100644 --- a/decoders/uart/pd.py +++ b/decoders/uart/pd.py @@ -28,9 +28,10 @@ Packet: This is the list of s and their respective values: - 'STARTBIT': The data is the (integer) value of the start bit (0/1). - - 'DATA': The data is the (integer) value of the UART data. Valid values - range from 0 to 512 (as the data can be up to 9 bits in size). - - 'DATABITS': List of data bits and their ss/es numbers. + - 'DATA': This is always a tuple containing two items: + - 1st item: the (integer) value of the UART data. Valid values + range from 0 to 512 (as the data can be up to 9 bits in size). + - 2nd item: the list of individual data bits and their ss/es numbers. - 'PARITYBIT': The data is the (integer) value of the parity bit (0/1). - 'STOPBIT': The data is the (integer) value of the stop bit (0 or 1). - 'INVALID STARTBIT': The data is the (integer) value of the start bit (0/1). @@ -263,8 +264,8 @@ class Decoder(srd.Decoder): self.state[rxtx] = 'GET PARITY BIT' - self.putpx(rxtx, ['DATABITS', rxtx, self.databits[rxtx]]) - self.putpx(rxtx, ['DATA', rxtx, self.databyte[rxtx]]) + self.putpx(rxtx, ['DATA', rxtx, + (self.databyte[rxtx], self.databits[rxtx])]) b, f = self.databyte[rxtx], self.options['format'] if f == 'ascii':