mode = 16; /* Act+apparent power */
else if (info->is_power_factor_freq)
mode = 17; /* Power factor / freq */
- else if (info->is_v_a_eff_value)
+ else if (info->is_v_a_rms_value)
mode = 18; /* V eff + A eff */
else {
sr_dbg("Invalid mode, range byte was: 0x%02x.", b);
info->is_power_factor_freq = TRUE;
else if (buf[1] == 0x32)
/* Voltage effective value + current effective value */
- info->is_v_a_eff_value = TRUE;
+ info->is_v_a_rms_value = TRUE;
break;
default:
sr_dbg("Invalid function bytes: %02x %02x.", buf[0], buf[1]);
// analog->mq = SR_MQ_FREQUENCY;
// analog->unit = SR_UNIT_HERTZ;
}
+ if (info->is_v_a_rms_value) {
+ analog->mqflags |= SR_MQFLAG_RMS;
+ analog->mq = SR_MQ_VOLTAGE;
+ analog->unit = SR_UNIT_VOLT;
+ /* TODO: Handle effective current value */
+ // analog->mq = SR_MQ_CURRENT;
+ // analog->unit = SR_UNIT_AMPERE;
+ }
/* Measurement related flags */
if (info->is_ac)
gboolean is_voltage, is_dc, is_ac, is_temperature, is_resistance;
gboolean is_continuity, is_capacitance, is_diode, is_loop_current;
gboolean is_current, is_micro, is_milli, is_power;
- gboolean is_power_factor_freq, is_power_apparent_power, is_v_a_eff_value;
+ gboolean is_power_factor_freq, is_power_apparent_power, is_v_a_rms_value;
gboolean is_sign2, is_sign1, is_batt, is_ol1, is_max, is_min;
gboolean is_maxmin, is_rel, is_ol2, is_open, is_manu, is_hold;
gboolean is_light, is_usb, is_warning, is_auto_power, is_misplug_warn;