if (info->is_dc)
analog->meaning->mqflags |= SR_MQFLAG_DC;
if (info->is_diode)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
if (info->is_peak_max)
analog->meaning->mqflags |= SR_MQFLAG_MAX;
if (info->is_peak_min)
analog->meaning->mq = SR_MQ_VOLTAGE;
analog->meaning->unit = SR_UNIT_VOLT;
if ((analog->meaning->mqflags & (SR_MQFLAG_DC | SR_MQFLAG_AC)) == 0)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
}
if (buf[14] & 2) {
analog->meaning->mq = SR_MQ_CURRENT;
if (info->is_auto)
analog->meaning->mqflags |= SR_MQFLAG_AUTORANGE;
if (info->is_diode)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
if (info->is_hold)
analog->meaning->mqflags |= SR_MQFLAG_HOLD;
if (info->is_rel)
if (info->is_auto)
analog->meaning->mqflags |= SR_MQFLAG_AUTORANGE;
if (info->is_diode)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
if (info->is_hold)
/*
* Note: HOLD only affects the number displayed on the LCD,
if (info->is_auto)
analog->meaning->mqflags |= SR_MQFLAG_AUTORANGE;
if (info->is_diode)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
if (info->is_hold)
analog->meaning->mqflags |= SR_MQFLAG_HOLD;
if (info->is_rel)
if (info->is_auto)
analog->meaning->mqflags |= SR_MQFLAG_AUTORANGE;
if (info->is_diode)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
if (info->is_hold)
analog->meaning->mqflags |= SR_MQFLAG_HOLD;
if (info->is_max)
if (info_local->is_z1) {
analog->meaning->mq = SR_MQ_VOLTAGE;
analog->meaning->unit = SR_UNIT_VOLT;
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
}
}
if (info->is_dc)
analog->meaning->mqflags |= SR_MQFLAG_DC;
if (info->is_diode)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
}
static gboolean flags_valid(const struct metex14_info *info)
if (info->is_auto)
analog->meaning->mqflags |= SR_MQFLAG_AUTORANGE;
if (info->is_diode)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
}
static gboolean flags_valid(const struct ut71x_info *info)
if (info->is_auto)
analog->meaning->mqflags |= SR_MQFLAG_AUTORANGE;
if (info->is_diode)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
if (info->is_hold)
/*
* Note: HOLD only affects the number displayed on the LCD,
} else if (!strcmp(mstr, "DIOD")) {
devc->cur_mq[i] = SR_MQ_VOLTAGE;
devc->cur_unit[i] = SR_UNIT_VOLT;
- devc->cur_mqflags[i] = SR_MQFLAG_DIODE;
+ devc->cur_mqflags[i] = SR_MQFLAG_DIODE | SR_MQFLAG_DC;
devc->cur_exponent[i] = 0;
devc->cur_digits[i] = 3;
} else if (!strcmp(mstr, "CAP")) {
} else if (!strcmp(mstr, "DIOD")) {
devc->cur_mq[i] = SR_MQ_VOLTAGE;
devc->cur_unit[i] = SR_UNIT_VOLT;
- devc->cur_mqflags[i] = SR_MQFLAG_DIODE;
+ devc->cur_mqflags[i] = SR_MQFLAG_DIODE | SR_MQFLAG_DC;
devc->cur_exponent[i] = 0;
if (devc->profile->model == KEYSIGHT_U1281 ||
devc->profile->model == KEYSIGHT_U1282) {
if (mstr[12] & 1) mqflags |= SR_MQFLAG_AVG;
if (mstr[12] & 2) mqflags |= SR_MQFLAG_MIN;
if (mstr[12] & 4) mqflags |= SR_MQFLAG_MAX;
- if (function == 5) mqflags |= SR_MQFLAG_DIODE;
+ if (function == 5) mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
g_free(mstr);
mq = mqs[function];
if (buf[8] & 0x01) {
analog[0].meaning->mq = SR_MQ_VOLTAGE;
analog[0].meaning->unit = SR_UNIT_VOLT;
- if (!strcmp(str, "diod"))
+ if (!strcmp(str, "diod")) {
analog[0].meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog[0].meaning->mqflags |= SR_MQFLAG_DC;
+ }
} else if (buf[14] & 0x80) {
analog[0].meaning->mq = SR_MQ_CURRENT;
analog[0].meaning->unit = SR_UNIT_AMPERE;
}
if (flags.is_diode)
- analog->meaning->mqflags |= SR_MQFLAG_DIODE;
+ analog->meaning->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
/* We can have both AC+DC in a single measurement. */
if (flags.is_ac)
analog->meaning->mqflags |= SR_MQFLAG_AC;
else if (meas_char == 3)
devc->mqflags |= SR_MQFLAG_DC | SR_MQFLAG_AC;
else if (meas_char == 15)
- devc->mqflags |= SR_MQFLAG_DIODE;
+ devc->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
break;
case 2:
devc->mq = SR_MQ_CURRENT;
case 0x08: /* 1000 Diode */
devc->mq = SR_MQ_VOLTAGE;
devc->unit = SR_UNIT_VOLT;
- devc->mqflags |= SR_MQFLAG_DIODE;
+ devc->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
break;
case 0x09: /* 1001 Ohm, °C */
case 0x0a: /* 1010 kOhm */
case 0x05: /* 0101 Diode/Diode with buzzer */
devc->mq = SR_MQ_VOLTAGE;
devc->unit = SR_UNIT_VOLT;
- devc->mqflags |= SR_MQFLAG_DIODE;
+ devc->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
break;
case 0x06: /* 0110 °C */
devc->mq = SR_MQ_TEMPERATURE;
devc->unit = SR_UNIT_VOLT;
if (ctmv == 0x0f) {
devc->mq = SR_MQ_VOLTAGE;
- devc->mqflags |= SR_MQFLAG_DIODE;
+ devc->mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
} else {
devc->mq = SR_MQ_CONTINUITY;
devc->scale += -5;
if (is_diode) {
meaning.mq = SR_MQ_VOLTAGE;
meaning.unit = SR_UNIT_VOLT;
- meaning.mqflags |= SR_MQFLAG_DIODE;
+ meaning.mqflags |= SR_MQFLAG_DIODE | SR_MQFLAG_DC;
if (ivalue < 0)
fvalue = NAN;
} else {