info->is_kilo = info->is_ohm = TRUE;
else if (!strcasecmp(u, "MOhm"))
info->is_mega = info->is_ohm = TRUE;
+ else if (!strcasecmp(u, "pF"))
+ info->is_pico = info->is_farad = TRUE;
else if (!strcasecmp(u, "nF"))
info->is_nano = info->is_farad = TRUE;
else if (!strcasecmp(u, "uF"))
const struct metex14_info *info)
{
/* Factors */
+ if (info->is_pico)
+ *floatval /= 1000000000000ULL;
if (info->is_nano)
*floatval /= 1000000000;
if (info->is_micro)
/* Does the packet have more than one multiplier? */
count = 0;
+ count += (info->is_pico) ? 1 : 0;
count += (info->is_nano) ? 1 : 0;
count += (info->is_micro) ? 1 : 0;
count += (info->is_milli) ? 1 : 0;
struct metex14_info {
gboolean is_ac, is_dc, is_resistance, is_capacity, is_temperature;
gboolean is_diode, is_frequency, is_ampere, is_volt, is_farad;
- gboolean is_hertz, is_ohm, is_celsius, is_nano, is_micro, is_milli;
- gboolean is_kilo, is_mega, is_gain, is_decibel, is_hfe, is_unitless;
+ gboolean is_hertz, is_ohm, is_celsius, is_pico, is_nano, is_micro;
+ gboolean is_milli, is_kilo, is_mega, is_gain, is_decibel, is_hfe;
+ gboolean is_unitless;
};
SR_PRIV int sr_metex14_packet_request(struct sr_serial_dev_inst *serial);