X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fapi.c;h=7f3d5f549321e0cc6025ee16f7a20624b3da1e44;hb=879dd50fb6d5f810d3c5635c3264b2c08ad22a70;hp=ff045f16425e61ad091be85868c2111845cb39fe;hpb=155b680da482cea2381becb73c51cfb838bff31e;p=libsigrok.git diff --git a/src/hardware/hameg-hmo/api.c b/src/hardware/hameg-hmo/api.c index ff045f16..7f3d5f54 100644 --- a/src/hardware/hameg-hmo/api.c +++ b/src/hardware/hameg-hmo/api.c @@ -29,7 +29,7 @@ static const char *manufacturers[] = { "HAMEG", }; -static const int32_t hwopts[] = { +static const int32_t scanopts[] = { SR_CONF_CONN, SR_CONF_SERIALCOMM, }; @@ -519,6 +519,10 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi, model = devc->model_config; switch (key) { + case SR_CONF_SCAN_OPTIONS: + *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, + scanopts, ARRAY_SIZE(scanopts), sizeof(int32_t)); + break; case SR_CONF_DEVICE_OPTIONS: if (cg_type == CG_NONE) { *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, @@ -723,6 +727,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) devc = sdi->priv; digital_added = FALSE; + g_slist_free(devc->enabled_channels); + devc->enabled_channels = NULL; + for (l = sdi->channels; l; l = l->next) { ch = l->data; if (!ch->enabled)