From: Alberto Scotta Date: Sat, 5 Dec 2020 15:05:51 +0000 (+0100) Subject: hantek-dso: fix 100MS/s X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=fe185e4990edba03faf6485dcd6a42aeb3b9a008;p=libsigrok.git hantek-dso: fix 100MS/s Do not downsample at 100MS/s. The device actually sampled at (100.0/0x1000)MS/s when 100MS/s was set. --- diff --git a/src/hardware/hantek-dso/protocol.c b/src/hardware/hantek-dso/protocol.c index c74187ad..d2101f2a 100644 --- a/src/hardware/hantek-dso/protocol.c +++ b/src/hardware/hantek-dso/protocol.c @@ -326,7 +326,8 @@ static int dso2250_set_trigger_samplerate(const struct sr_dev_inst *sdi) } tmp = base / devc->samplerate; - if (tmp) { + /* Downsample only if really necessary */ + if (tmp > 1) { /* Downsampling on */ cmdstring[2] |= 2; /* Downsampler = 1comp((Base / Samplerate) - 2)