]> sigrok.org Git - libsigrok.git/commitdiff
Fix various sample/time limit regressions.
authorUwe Hermann <redacted>
Mon, 29 Aug 2016 16:39:12 +0000 (18:39 +0200)
committerUwe Hermann <redacted>
Mon, 29 Aug 2016 19:51:28 +0000 (21:51 +0200)
These were accidentally introduced when the sw_limits helpers were added.

src/hardware/appa-55ii/api.c
src/hardware/arachnid-labs-re-load-pro/api.c
src/hardware/korad-kaxxxxp/api.c
src/hardware/manson-hcs-3xxx/api.c

index ff0e1aede590b0603612de7dea0a177796b98d4d..27fb992a67307c658038540bba4d069dea63e50e 100644 (file)
@@ -146,6 +146,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
 
        switch (key) {
        case SR_CONF_LIMIT_SAMPLES:
+       case SR_CONF_LIMIT_MSEC:
                return sr_sw_limits_config_set(&devc->limits, key, data);
        case SR_CONF_DATA_SOURCE: {
                tmp_str = g_variant_get_string(data, NULL);
index d0a74fa7445f6c99ef492ae9940298ee403e3a39..0c00c2fa2411ee03cfd0c669358bd3b1fb2f9232 100644 (file)
@@ -287,6 +287,7 @@ static int config_set(uint32_t key, GVariant *data,
        ret = SR_OK;
        switch (key) {
        case SR_CONF_LIMIT_SAMPLES:
+       case SR_CONF_LIMIT_MSEC:
                return sr_sw_limits_config_set(&devc->limits, key, data);
        case SR_CONF_ENABLED:
                ret = reloadpro_set_on_off(sdi, g_variant_get_boolean(data));
index c6e752551f3b5eeeac98aff69be27b5832414551..fc57725cbf8f47c64546ea2c83b4507d73ca3279 100644 (file)
@@ -176,6 +176,8 @@ static int config_get(uint32_t key, GVariant **data,
        devc = sdi->priv;
 
        switch (key) {
+       case SR_CONF_LIMIT_SAMPLES:
+       case SR_CONF_LIMIT_MSEC:
                return sr_sw_limits_config_get(&devc->limits, key, data);
        case SR_CONF_VOLTAGE:
                *data = g_variant_new_double(devc->voltage);
index 59e30d3fb73fdcf4bce714781db3b9e2a1b9e121..bc2700fa952ecca47fada9ce3ee67977c5f88e58 100644 (file)
@@ -241,6 +241,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
 
        switch (key) {
        case SR_CONF_LIMIT_MSEC:
+       case SR_CONF_LIMIT_SAMPLES:
                return sr_sw_limits_config_set(&devc->limits, key, data);
        case SR_CONF_VOLTAGE_TARGET:
                dval = g_variant_get_double(data);