From 55bcd7ad4549041ef3621e4a47dc06584f16df1e Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 28 Apr 2018 23:39:59 +0200 Subject: [PATCH] dreamsourcelab-dslogic: Properly set initial voltage threshold. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The initial voltage threshold in dev_open() was being set to a default value in the devc->cur_threshold variable but not actually set in the device itself. Patch by Jörg Alpers , thanks a lot! --- src/hardware/dreamsourcelab-dslogic/api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hardware/dreamsourcelab-dslogic/api.c b/src/hardware/dreamsourcelab-dslogic/api.c index 08d9f0b6..66c4dc73 100644 --- a/src/hardware/dreamsourcelab-dslogic/api.c +++ b/src/hardware/dreamsourcelab-dslogic/api.c @@ -360,8 +360,10 @@ static int dev_open(struct sr_dev_inst *sdi) devc->cur_samplerate = devc->samplerates[0]; } - if (devc->cur_threshold == 0.0) + if (devc->cur_threshold == 0.0) { devc->cur_threshold = thresholds[1][0]; + return dslogic_set_voltage_threshold(sdi, devc->cur_threshold); + } return SR_OK; }