From: Frank Stettner Date: Wed, 13 Sep 2017 11:30:24 +0000 (+0200) Subject: conrad-digi-35-cpu: Fix key names for setting voltage and current X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=57837aeda5d0e738717a1f397f0934d8e1e307f1;p=libsigrok.git conrad-digi-35-cpu: Fix key names for setting voltage and current --- diff --git a/src/hardware/conrad-digi-35-cpu/api.c b/src/hardware/conrad-digi-35-cpu/api.c index 03185cca..0548d50d 100644 --- a/src/hardware/conrad-digi-35-cpu/api.c +++ b/src/hardware/conrad-digi-35-cpu/api.c @@ -32,8 +32,8 @@ static const uint32_t drvopts[] = { }; static const uint32_t devopts[] = { - SR_CONF_VOLTAGE | SR_CONF_SET, - SR_CONF_CURRENT | SR_CONF_SET, + SR_CONF_VOLTAGE_TARGET | SR_CONF_SET, + SR_CONF_CURRENT_LIMIT | SR_CONF_SET, SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_SET, }; @@ -102,14 +102,14 @@ static int config_set(uint32_t key, GVariant *data, (void)cg; switch (key) { - case SR_CONF_VOLTAGE: + case SR_CONF_VOLTAGE_TARGET: dblval = g_variant_get_double(data); if ((dblval < 0.0) || (dblval > 35.0)) { sr_err("Voltage out of range (0 - 35.0)!"); return SR_ERR_ARG; } return send_msg1(sdi, 'V', (int) (dblval * 10 + 0.5)); - case SR_CONF_CURRENT: + case SR_CONF_CURRENT_LIMIT: dblval = g_variant_get_double(data); if ((dblval < 0.01) || (dblval > 2.55)) { sr_err("Current out of range (0 - 2.55)!");