rigol-ds: Quick hack to fix bug #354.

This commit is contained in:
Martin Ling 2014-05-05 00:38:58 +01:00
parent a9af7b1b8b
commit 05238d2830
1 changed files with 7 additions and 2 deletions

View File

@ -271,10 +271,15 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
const struct rigol_ds_model *model = NULL; const struct rigol_ds_model *model = NULL;
gchar *channel_name, **version; gchar *channel_name, **version;
if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
sr_info("Couldn't get IDN response, retrying.");
sr_scpi_close(scpi);
sr_scpi_open(scpi);
if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) { if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
sr_info("Couldn't get IDN response."); sr_info("Couldn't get IDN response.");
return NULL; return NULL;
} }
}
for (i = 0; i < ARRAY_SIZE(supported_models); i++) { for (i = 0; i < ARRAY_SIZE(supported_models); i++) {
if (!strcasecmp(hw_info->manufacturer, if (!strcasecmp(hw_info->manufacturer,