info->is_gain = !strncmp(buf, "DB", 2) && info->is_decibel;
info->is_power = (!strncmp(buf, "dB", 2) && info->is_decibel_mw) ||
((!strncmp(buf, "WT", 2) && info->is_watt));
+ info->is_power_factor = !strncmp(buf, "CO", 2) && info->is_unitless;
info->is_hfe = !strncmp(buf, "HF", 2) ||
(!strncmp(buf, " ", 2) && !info->is_volt && !info->is_ohm &&
!info->is_logic && !info->is_farad && !info->is_hertz);
else
analog->meaning->unit = SR_UNIT_UNITLESS;
}
+ if (info->is_power_factor) {
+ analog->meaning->mq = SR_MQ_POWER_FACTOR;
+ analog->meaning->unit = SR_UNIT_UNITLESS;
+ }
if (info->is_gain) {
analog->meaning->mq = SR_MQ_GAIN;
analog->meaning->unit = SR_UNIT_DECIBEL_VOLT;
gboolean is_diode, is_frequency, is_ampere, is_volt, is_farad;
gboolean is_hertz, is_ohm, is_celsius, is_fahrenheit, is_watt;
gboolean is_pico, is_nano, is_micro, is_milli, is_kilo, is_mega;
- gboolean is_gain, is_decibel, is_power, is_decibel_mw;
+ gboolean is_gain, is_decibel, is_power, is_decibel_mw, is_power_factor;
gboolean is_hfe, is_unitless, is_logic, is_min, is_max, is_avg;
};