if (devc->mq == SR_MQ_VOLTAGE) /* V */
devc->scale *= 0.1;
else if (devc->mq == SR_MQ_CURRENT) /* 000.0 µA */
- devc->scale *= 0.0000001; /* Untested! */
+ devc->scale *= 0.00001;
else if (devc->mq == SR_MQ_RESISTANCE) {
if (devc->buflen >= 10) {
/* °C with 10 byte msg type, otherwise GOhm. */
devc->unit = SR_UNIT_UNITLESS;
devc->mqflags |= SR_MQFLAG_AC;
break;
+ case 0x1f: /* 11111 Undocumented: 25S in stopwatch mode.
+ The value is voltage, not time, so treat it such. */
+ devc->mq = SR_MQ_VOLTAGE;
+ devc->unit = SR_UNIT_VOLT;
+ devc->mqflags |= SR_MQFLAG_DC;
+ break;
+ case 0x20: /* 100000 Undocumented: 25S in event count mode.
+ Value is 0 anyway. */
+ devc->mq = SR_MQ_VOLTAGE;
+ devc->unit = SR_UNIT_UNITLESS;
+ break;
default:
- sr_err("decode_ctmv_2x(%d, ...): Unknown ctmv!");
+ sr_err("decode_ctmv_2x(%d, ...): Unknown ctmv!", ctmv);
break;
}
}
devc = sdi->priv;
memset(&analog, 0, sizeof(analog));
- analog.probes = sdi->probes;
+ analog.channels = sdi->channels;
analog.num_samples = 1;
analog.mq = devc->mq;
analog.unit = devc->unit;
}
}
- /* If number of samples or time limit reached, stop aquisition. */
+ /* If number of samples or time limit reached, stop acquisition. */
if (devc->limit_samples && (devc->num_samples >= devc->limit_samples))
sdi->driver->dev_acquisition_stop(sdi, cb_data);
}
}
- /* If number of samples or time limit reached, stop aquisition. */
+ /* If number of samples or time limit reached, stop acquisition. */
if (devc->limit_samples && (devc->num_samples >= devc->limit_samples))
sdi->driver->dev_acquisition_stop(sdi, cb_data);
/** @copydoc sr_dev_driver.config_set
*/
SR_PRIV int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
- const struct sr_probe_group *probe_group)
+ const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint8_t params[9];
uint8_t msg[42];
- (void)probe_group;
+ (void)cg;
if (sdi->status != SR_ST_ACTIVE)
return SR_ERR_DEV_CLOSED;
}
devc->limit_msec = g_variant_get_uint64(data);
sr_dbg("Setting time limit to %" PRIu64 "ms.",
- devc->limit_msec);
+ devc->limit_msec);
break;
case SR_CONF_LIMIT_SAMPLES:
devc->limit_samples = g_variant_get_uint64(data);
sr_dbg("Setting sample limit to %" PRIu64 ".",
- devc->limit_samples);
+ devc->limit_samples);
break;
default:
return SR_ERR_NA;