for (l = probes; l; l = l->next) {
probe = (struct sr_probe *)l->data;
- probebit = 1 << (probe->index - 1);
+ probebit = 1 << (probe->index);
if (!probe->enabled || !probe->trigger)
continue;
return SR_ERR;
}
- probe_bit = (1 << (probe->index - 1));
+ probe_bit = (1 << (probe->index));
/* Configure the probe's trigger mask and trigger pattern. */
for (tc = probe->trigger; tc && *tc; tc++) {
if (probe->enabled == FALSE)
continue;
- if (probe->index > 8)
+ if (probe->index > 7)
ctx->sample_wide = TRUE;
- probe_bit = 1 << (probe->index - 1);
+ probe_bit = 1 << (probe->index);
if (!(probe->trigger))
continue;
ctx->ch1_enabled = ctx->ch2_enabled = FALSE;
for (l = probes; l; l = l->next) {
probe = (struct sr_probe *)l->data;
- if (probe->index == 1)
+ if (probe->index == 0)
ctx->ch1_enabled = probe->enabled;
- else if (probe->index == 2)
+ else if (probe->index == 1)
ctx->ch2_enabled = probe->enabled;
}
* Set up the probe mask for later configuration into the
* flag register.
*/
- probe_bit = 1 << (probe->index - 1);
+ probe_bit = 1 << (probe->index);
ctx->probe_mask |= probe_bit;
if (!probe->trigger)
probe = (struct sr_probe *)l->data;
if (probe->enabled == FALSE)
continue;
- probe_bit = 1 << (probe->index - 1);
+ probe_bit = 1 << (probe->index);
ctx->probe_mask |= probe_bit;
if (probe->trigger) {