+ for (l = sdi->probes; l; l = l->next) {
+ probe = l->data;
+ sr_dbg("handling probe %s", probe->name);
+ if (probe->type == SR_PROBE_ANALOG) {
+ if (probe->enabled)
+ devc->enabled_analog_probes = g_slist_append(
+ devc->enabled_analog_probes, probe);
+ if (probe->enabled != devc->analog_channels[probe->index]) {
+ /* Enabled channel is currently disabled, or vice versa. */
+ sprintf(cmd, ":CHAN%d:DISP %s", probe->index + 1,
+ probe->enabled ? "ON" : "OFF");
+ if (rigol_ds1xx2_send(sdi, cmd) != SR_OK)
+ return SR_ERR;
+ }
+ } else if (probe->type == SR_PROBE_LOGIC) {
+ if (probe->enabled)
+ devc->enabled_digital_probes = g_slist_append(
+ devc->enabled_digital_probes, probe);
+ if (probe->enabled != devc->digital_channels[probe->index]) {
+ /* Enabled channel is currently disabled, or vice versa. */
+ sprintf(cmd, ":DIG%d:TURN %s", probe->index,
+ probe->enabled ? "ON" : "OFF");
+ if (rigol_ds1xx2_send(sdi, cmd) != SR_OK)
+ return SR_ERR;
+ }
+ }
+ }
+ if (!devc->enabled_analog_probes && !devc->enabled_digital_probes)
+ return SR_ERR;