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.
This commit is contained in:
Alberto Scotta 2020-12-05 16:05:51 +01:00 committed by Soeren Apel
parent 0f5dcee6ce
commit fe185e4990
1 changed files with 2 additions and 1 deletions

View File

@ -326,7 +326,8 @@ static int dso2250_set_trigger_samplerate(const struct sr_dev_inst *sdi)
} }
tmp = base / devc->samplerate; tmp = base / devc->samplerate;
if (tmp) { /* Downsample only if really necessary */
if (tmp > 1) {
/* Downsampling on */ /* Downsampling on */
cmdstring[2] |= 2; cmdstring[2] |= 2;
/* Downsampler = 1comp((Base / Samplerate) - 2) /* Downsampler = 1comp((Base / Samplerate) - 2)