summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
d008c02)
Device or model or protocol variant specific commands should only be
used after the device reliably got identified. The "CHDR OFF" command
upsets other devices and needs to move after *IDN? and model checks.
const struct siglent_sds_model *model;
gchar *channel_name;
const struct siglent_sds_model *model;
gchar *channel_name;
- sr_dbg("Setting Communication Headers to off.");
- if (sr_scpi_send(scpi, "CHDR OFF") != SR_OK)
- return NULL;
-
if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
sr_info("Couldn't get IDN response, retrying.");
sr_scpi_close(scpi);
if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
sr_info("Couldn't get IDN response, retrying.");
sr_scpi_close(scpi);
+ sr_dbg("Setting Communication Headers to off.");
+ if (sr_scpi_send(scpi, "CHDR OFF") != SR_OK)
+ return NULL;
+
sdi = g_malloc0(sizeof(struct sr_dev_inst));
sdi->vendor = g_strdup(model->series->vendor->name);
sdi->model = g_strdup(model->name);
sdi = g_malloc0(sizeof(struct sr_dev_inst));
sdi->vendor = g_strdup(model->series->vendor->name);
sdi->model = g_strdup(model->name);