]> sigrok.org Git - libsigrok.git/commitdiff
gwinstek-gpd: Add missing SW limits API calls.
authorTimo Kokkonen <redacted>
Tue, 14 Jul 2020 04:54:25 +0000 (21:54 -0700)
committerGerhard Sittig <redacted>
Mon, 3 Aug 2020 16:54:33 +0000 (18:54 +0200)
src/hardware/gwinstek-gpd/api.c
src/hardware/gwinstek-gpd/protocol.c

index 5de7e467c04f8e5232ec1bc312ba3306901e0808..aff3a7a2faf4d2885c05db94b513d64448a4ecf5 100644 (file)
@@ -248,6 +248,9 @@ static int config_get(uint32_t key, GVariant **data,
 
        if (!cg) {
                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_CHANNEL_CONFIG:
                        *data = g_variant_new_string(
                                channel_modes[devc->channel_mode]);
index 19a664e5f2e7d96807d26c4bdb43015ab7870a9c..e69995902cfe82a4ee95c50800d456dfadf1f065 100644 (file)
@@ -175,6 +175,7 @@ SR_PRIV int gpd_receive_data(int fd, int revents, void *cb_data)
                        }
 
                        devc->reply_pending = FALSE;
+                       sr_sw_limits_update_samples_read(&devc->limits, 1);
                }
        } else {
                if (!devc->reply_pending) {