]> sigrok.org Git - libsigrok.git/commitdiff
ols: Display actual expanded sample instead of the raw sample
authorv1ne <redacted>
Wed, 1 Apr 2020 14:15:36 +0000 (16:15 +0200)
committerGerhard Sittig <redacted>
Wed, 6 Jan 2021 09:45:28 +0000 (10:45 +0100)
While the raw sample is the actual received data, the expanded sample is the
crucial data I as a developer am interested in seeing. At least if I assume that
the sample expansion works.

src/hardware/openbench-logic-sniffer/protocol.c

index b9a4ffa276862c54fcf58cee1b39fe7e8221d4ab..bedf29500f841ececadce828bcd0eb57a6e4232f 100644 (file)
@@ -463,7 +463,8 @@ SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data)
                                        }
                                }
                                memcpy(devc->sample, devc->tmp_sample, 4);
-                               sr_spew("Expanded sample: 0x%.8x.", sample);
+                               sr_spew("Expanded sample: 0x%.2hhx%.2hhx%.2hhx%.2hhx ",
+                                       devc->sample[3], devc->sample[2], devc->sample[1], devc->sample[0]);
                        }
 
                        /*