hantek-dso: dso2250: Report the sample rate back.

So that cursor (and other) measurements and the time axis are correct.
This commit is contained in:
Philipp Marek 2017-11-18 15:04:03 +01:00 committed by Uwe Hermann
parent 87f56d0178
commit 3b2b703177
1 changed files with 6 additions and 0 deletions

View File

@ -62,6 +62,7 @@ static const uint32_t devopts[] = {
SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET,
SR_CONF_BUFFERSIZE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_NUM_VDIV | SR_CONF_GET,
};
@ -430,6 +431,11 @@ static int config_get(uint32_t key, GVariant **data,
*data = g_variant_new("(tt)", timebases[devc->timebase][0],
timebases[devc->timebase][1]);
break;
case SR_CONF_SAMPLERATE:
*data = g_variant_new_uint64(
timebases[devc->timebase][1]/
timebases[devc->timebase][0]);
break;
case SR_CONF_BUFFERSIZE:
*data = g_variant_new_uint64(devc->framesize);
break;