static void handle_qm_18x(const struct sr_dev_inst *sdi, char **tokens)
{
struct dev_context *devc;
static void handle_qm_18x(const struct sr_dev_inst *sdi, char **tokens)
{
struct dev_context *devc;
*e++ = '\0';
if (sr_atof_ascii(tokens[1], &fvalue) != SR_OK) {
/* Happens all the time, when switching modes. */
*e++ = '\0';
if (sr_atof_ascii(tokens[1], &fvalue) != SR_OK) {
/* Happens all the time, when switching modes. */
- /* TODO: Use proper 'digits' value for this device (and its modes). */
- sr_analog_init(&analog, &encoding, &meaning, &spec, 2);
+ sr_analog_init(&analog, &encoding, &meaning, &spec, digits);
- /* TODO: Use proper 'digits' value for this device (and its modes). */
- sr_analog_init(&analog, &encoding, &meaning, &spec, 2);
+ sr_analog_init(&analog, &encoding, &meaning, &spec, digits);
if (!strcmp(tokens[0], "9.9E+37")) {
/* An invalid measurement shows up on the display as "OL", but
* comes through like this. Since comparing 38-digit floats
if (!strcmp(tokens[0], "9.9E+37")) {
/* An invalid measurement shows up on the display as "OL", but
* comes through like this. Since comparing 38-digit floats
- /* TODO: Use proper 'digits' value for this device (and its modes). */
- sr_analog_init(&analog, &encoding, &meaning, &spec, 2);
+ sr_analog_init(&analog, &encoding, &meaning, &spec, digits);
tokens = g_strsplit(devc->buf, ",", 0);
if (tokens[0]) {
tokens = g_strsplit(devc->buf, ",", 0);
if (tokens[0]) {
devc->expect_response = FALSE;
handle_qm_18x(sdi, tokens);
} else if (devc->profile->model == FLUKE_287 || devc->profile->model == FLUKE_289) {
devc->expect_response = FALSE;
handle_qm_18x(sdi, tokens);
} else if (devc->profile->model == FLUKE_287 || devc->profile->model == FLUKE_289) {