X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fyokogawa-dlm%2Fapi.c;h=23d21185278d9b4044ac3a7701c4d91589172913;hb=6fad08e6abfa4e5ee708f584e530c6b611a65cdb;hp=276ff0ffbcdb4456a2583f52d225c8b477972061;hpb=584560f142e1b17b9f4ef9069bd3724f2f77e750;p=libsigrok.git diff --git a/src/hardware/yokogawa-dlm/api.c b/src/hardware/yokogawa-dlm/api.c index 276ff0ff..23d21185 100644 --- a/src/hardware/yokogawa-dlm/api.c +++ b/src/hardware/yokogawa-dlm/api.c @@ -62,10 +62,12 @@ static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi) if (dlm_model_get(hw_info->model, &model_name, &model_index) != SR_OK) goto fail; - if (!(sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, MANUFACTURER_NAME, - model_name, NULL))) + if (!(sdi = sr_dev_inst_new(SR_ST_ACTIVE, MANUFACTURER_NAME, + model_name, hw_info->firmware_version))) goto fail; + sdi->serial_num = g_strdup(hw_info->serial_number); + sr_scpi_hw_info_free(hw_info); hw_info = NULL; @@ -477,16 +479,13 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst * model = devc->model_config; switch (key) { - case SR_CONF_SCAN_OPTIONS: - *data = NULL; - break; case SR_CONF_DEVICE_OPTIONS: if (cg_type == CG_NONE) { *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, - model->hw_caps, model->num_hwcaps, sizeof(uint32_t)); + model->devopts, model->num_devopts, sizeof(uint32_t)); } else if (cg_type == CG_ANALOG) { *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, - model->analog_hwcaps, model->num_analog_hwcaps, sizeof(uint32_t)); + model->analog_devopts, model->num_analog_devopts, sizeof(uint32_t)); } else { *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, NULL, 0, sizeof(uint32_t));