* This file is part of the libsigrok project.
*
* Copyright (C) 2014 Bert Vermeulen <bert@biot.com>
- * Copyright (C) 2017 Frank Stettner <frank-stettner@gmx.net>
+ * Copyright (C) 2017,2019 Frank Stettner <frank-stettner@gmx.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
for (l = sdi->channels; l; l = l->next) {
ch = l->data;
pch = ch->priv;
+ /* Add mqflags from channel_group_spec only to voltage
+ * and current channels
+ */
+ if (pch->mq == SR_MQ_VOLTAGE || pch->mq == SR_MQ_CURRENT)
+ pch->mqflags = cgs->mqflags;
+ else
+ pch->mqflags = 0;
if (pch->hw_output_idx == j)
cg->channels = g_slist_append(cg->channels, ch);
}
*data = g_variant_new_string("CC");
}
}
+ if (devc->device->dialect == SCPI_DIALECT_HP_COMP) {
+ /* Evaluate Status Register from a HP 66xx in COMP mode. */
+ s = g_variant_get_string(*data, NULL);
+ sr_atoi(s, ®);
+ g_variant_unref(*data);
+ if (reg & (1 << 0))
+ *data = g_variant_new_string("CV");
+ else if (reg & (1 << 1))
+ *data = g_variant_new_string("CC");
+ else if (reg & (1 << 2))
+ *data = g_variant_new_string("UR");
+ else if (reg & (1 << 9))
+ *data = g_variant_new_string("CC-");
+ else
+ *data = g_variant_new_string("");
+ }
if (devc->device->dialect == SCPI_DIALECT_HP_66XXB) {
/* Evaluate Operational Status Register from a HP 66xxB. */
s = g_variant_get_string(*data, NULL);
}
s = g_variant_get_string(*data, NULL);
- if (g_strcmp0(s, "CV") && g_strcmp0(s, "CC") &&
- g_strcmp0(s, "CC-") && g_strcmp0(s, "UR")) {
+ if (g_strcmp0(s, "CV") && g_strcmp0(s, "CC") && g_strcmp0(s, "CC-") &&
+ g_strcmp0(s, "UR") && g_strcmp0(s, "")) {
sr_err("Unknown response to SCPI_CMD_GET_OUTPUT_REGULATION: %s", s);
ret = SR_ERR_DATA;
/* Prime the pipe with the first channel. */
devc->cur_acquisition_channel = sr_next_enabled_channel(sdi, NULL);
+ /* Device specific initialization before aquisition starts. */
+ if (devc->device->init_aquisition)
+ devc->device->init_aquisition(sdi);
+
if ((ret = sr_scpi_source_add(sdi->session, scpi, G_IO_IN, 10,
scpi_pps_receive_data, (void *)sdi)) != SR_OK)
return ret;