From: Uwe Hermann Date: Sat, 28 Apr 2018 21:39:59 +0000 (+0200) Subject: dreamsourcelab-dslogic: Properly set initial voltage threshold. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=55bcd7ad4549041ef3621e4a47dc06584f16df1e;p=libsigrok.git dreamsourcelab-dslogic: Properly set initial voltage threshold. 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! --- 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; }