]> sigrok.org Git - sigrok-cli.git/commitdiff
sr: sr_samplerate_string: Allow 3.15Hz etc. as output.
authorUwe Hermann <redacted>
Mon, 27 Feb 2012 21:27:33 +0000 (22:27 +0100)
committerUwe Hermann <redacted>
Mon, 27 Feb 2012 21:27:33 +0000 (22:27 +0100)
This is required for some hardware, e.g. ChronoVu LA8, where
33.333333 MHz or 2.439024 MHz are valid samplerates. This is because the
hardware takes a sampleperiod (in nanoseconds) as input, not a
samplerate (in Hz).

sigrok-cli.c

index 1b34bf5c9701ccd772ce2b696cca02e207cc9fb2..d34dd5a09ac2830910628b8c76552f5ae7841101 100644 (file)
@@ -248,7 +248,7 @@ static void show_dev_detail(void)
                        } else {
                                printf(" - supported samplerates:\n");
                                for (i = 0; samplerates->list[i]; i++) {
-                                       printf("      %7s\n", sr_samplerate_string(samplerates->list[i]));
+                                       printf("      %s\n", sr_samplerate_string(samplerates->list[i]));
                                }
                        }
                } else {