Bug 708

Summary: 9 bit UART decoding not working
Product: libsigrokdecode Reporter: Theo <husseytg>
Component: PD: uartAssignee: Nobody <nobody>
Status: RESOLVED FIXED    
Severity: normal CC: husseytg, martin-sigrokbugs, philip, uwe
Priority: Normal    
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: session file with 9bit 9600baud uart data
fix uart decoder failure when num_data_bits=9

Description Theo 2015-12-03 23:44:20 CET
Created attachment 194 [details]
session file with 9bit 9600baud uart data

No decode output is shown when 9 bitUART decode is selected. Works fine when 8 bit decode is selected but with framing errors (as the data is 9 bit). Version 0.3.0-git-8f6b98f
Comment 1 Uwe Hermann 2016-02-03 17:57:30 CET
*** Bug 747 has been marked as a duplicate of this bug. ***
Comment 2 Drew Dibble 2016-06-07 04:13:02 CEST
Created attachment 250 [details]
fix uart decoder failure when num_data_bits=9

Current code gives the error:
srd: Protocol decoder instance uart: ValueError: bytes must be in range(0, 256)

when decoding 9-bit serial. Changing bytes() to bin() fixes the error and displays the proper number of bits.
Comment 3 Uwe Hermann 2016-10-23 22:30:22 CEST
Fixed in 98b8913915e8649cca83f543e84fbf128707b5fb.