From: Uwe Hermann Date: Mon, 27 Feb 2012 21:27:33 +0000 (+0100) Subject: sr: sr_samplerate_string: Allow 3.15Hz etc. as output. X-Git-Tag: sigrok-cli-0.3.0~20 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9da0b05b3a2abafd3e346d0aec16534984da06db;p=sigrok-cli.git sr: sr_samplerate_string: Allow 3.15Hz etc. as output. 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). --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 1b34bf5..d34dd5a 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -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 {