X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fapi.c;fp=src%2Fhardware%2Fhameg-hmo%2Fapi.c;h=bf46a3bbfaf8308b923c63ba55f85525ebfd5ddb;hp=1274b919bf61dd20d8f837e4c47da0aad21e9c3b;hb=d779dcacb70ffcfed190612e39a3ac5df62b31e0;hpb=6d0f3508f73e7a6de3c956ef7ca69813de91d7d1 diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index 1274b919..bf46a3bb 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -247,6 +247,10 @@ static int config_set(uint32_t key, GVariant *data, update_sample_rate = FALSE; switch (key) { + case SR_CONF_LIMIT_SAMPLES: + devc->samples_limit = g_variant_get_uint64(data); + ret = SR_OK; + break; case SR_CONF_LIMIT_FRAMES: devc->frame_limit = g_variant_get_uint64(data); ret = SR_OK; @@ -601,6 +605,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) scpi = sdi->conn; devc = sdi->priv; + devc->num_samples = 0; + devc->num_frames = 0; + /* Preset empty results. */ for (group = 0; group < ARRAY_SIZE(digital_added); group++) digital_added[group] = FALSE; @@ -681,6 +688,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) devc = sdi->priv; + devc->num_samples = 0; devc->num_frames = 0; g_slist_free(devc->enabled_channels); devc->enabled_channels = NULL;