break;
case SR_CONF_NUM_VDIV:
if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
return SR_ERR_CHANNEL_GROUP;
} else if (cg_type == CG_ANALOG) {
for (i = 0; i < model->analog_channels; i++) {
break;
case SR_CONF_VDIV:
if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
return SR_ERR_CHANNEL_GROUP;
} else if (cg_type == CG_ANALOG) {
for (i = 0; i < model->analog_channels; i++) {
break;
case SR_CONF_COUPLING:
if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
return SR_ERR_CHANNEL_GROUP;
} else if (cg_type == CG_ANALOG) {
for (i = 0; i < model->analog_channels; i++) {
}
break;
case SR_CONF_VDIV:
- if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
+ if (cg_type == CG_NONE)
return SR_ERR_CHANNEL_GROUP;
- }
g_variant_get(data, "(tt)", &p, &q);
}
break;
case SR_CONF_COUPLING:
- if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
+ if (cg_type == CG_NONE)
return SR_ERR_CHANNEL_GROUP;
- }
tmp = g_variant_get_string(data, NULL);
break;
case SR_CONF_NUM_VDIV:
if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
return SR_ERR_CHANNEL_GROUP;
} else if (cg_type == CG_ANALOG) {
*data = g_variant_new_int32(model->num_ydivs);
case SR_CONF_VDIV:
ret = SR_ERR_NA;
if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
return SR_ERR_CHANNEL_GROUP;
} else if (cg_type != CG_ANALOG)
break;
case SR_CONF_COUPLING:
ret = SR_ERR_NA;
if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
return SR_ERR_CHANNEL_GROUP;
} else if (cg_type != CG_ANALOG)
break;
}
break;
case SR_CONF_VDIV:
- if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
+ if (cg_type == CG_NONE)
return SR_ERR_CHANNEL_GROUP;
- }
g_variant_get(data, "(tt)", &p, &q);
ret = dlm_trigger_slope_set(sdi->conn, state->trigger_slope);
break;
case SR_CONF_COUPLING:
- if (cg_type == CG_NONE) {
- sr_err("No channel group specified.");
+ if (cg_type == CG_NONE)
return SR_ERR_CHANNEL_GROUP;
- }
tmp = g_variant_get_string(data, NULL);
g_variant_ref_sink(*data);
}
+ if (ret == SR_ERR_CHANNEL_GROUP)
+ sr_err("%s: No channel group specified.",
+ (sdi) ? sdi->driver->name : "unknown");
+
return ret;
}