]> sigrok.org Git - libsigrok.git/commit - output/vcd.c
vcd: Fix output for more than 8 channels.
authorDaniel Elstner <redacted>
Thu, 30 Jan 2014 19:49:36 +0000 (20:49 +0100)
committerUwe Hermann <redacted>
Thu, 30 Jan 2014 20:23:26 +0000 (21:23 +0100)
commit563080a8d1f1737578a313b89995a9da6ec1077c
tree9e08e2c43288cb774e76c803a608d311d7b0fccd
parenta6c12f3f70fe301051b7de4ae144db926ebeac9c
vcd: Fix output for more than 8 channels.

(receive): Use probe index for sample byte selection too, not just
for bit selection.  Also simplify the indexing expressions a bit.
This fixes the problem of incorrect output for probes indices 8 to
31.
Also, use double rather than float in the timestamp calculation,
and format the result directly as floating point number rather than
converting it back to uint64_t.
Additionally, make sure that the state of all signals is written
for the very first sample in the stream.  This fixes the problem
that signals would be displayed as indeterminate until the first
change.
(context.samplecount): Make the sample counter part of the context
struct, rather than keeping it as a global static.
output/vcd.c