zeroplus: Ignore capture ratio if there is no trigger
If there is no trigger, don't try to capture anything before it. There won't be any because we trigger immediately. Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
This commit is contained in:
parent
05f853b5c3
commit
4c1433d172
|
@ -98,7 +98,11 @@ SR_PRIV void set_triggerbar(struct dev_context *devc)
|
||||||
trigger_depth = get_memory_size(devc->memory_size) / 4;
|
trigger_depth = get_memory_size(devc->memory_size) / 4;
|
||||||
if (devc->limit_samples < trigger_depth)
|
if (devc->limit_samples < trigger_depth)
|
||||||
trigger_depth = devc->limit_samples;
|
trigger_depth = devc->limit_samples;
|
||||||
triggerbar = trigger_depth * devc->capture_ratio / 100;
|
|
||||||
|
if (devc->trigger)
|
||||||
|
triggerbar = trigger_depth * devc->capture_ratio / 100;
|
||||||
|
else
|
||||||
|
triggerbar = 0;
|
||||||
|
|
||||||
ramsize_trigger = trigger_depth - triggerbar;
|
ramsize_trigger = trigger_depth - triggerbar;
|
||||||
/* Matches USB packet captures from official app/driver */
|
/* Matches USB packet captures from official app/driver */
|
||||||
|
|
Loading…
Reference in New Issue