X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fdmm%2Feev121gw.c;h=7dfba8d0dfbec0078857600718b6fa4c8a3f8d11;hb=f5c697bfe6d80c95051eaa1f52e1fefb54effa97;hp=e279c34c38bb4aca3a48a68623fc02f68c19fdc2;hpb=72b6f1c0821d340cd7cb7bf27c0bc0866d4a54f7;p=libsigrok.git diff --git a/src/dmm/eev121gw.c b/src/dmm/eev121gw.c index e279c34c..7dfba8d0 100644 --- a/src/dmm/eev121gw.c +++ b/src/dmm/eev121gw.c @@ -22,8 +22,6 @@ * * EEVblog 121GW 19-bytes binary protocol parser. * - * @internal - * * Note that this protocol is different from other meters. We need not * decode the LCD presentation (segments a-g and dot of seven segment * displays). Neither need we decode a textual presentation consisting @@ -691,7 +689,7 @@ SR_PRIV gboolean sr_eev121gw_packet_valid(const uint8_t *buf) * @return SR_OK upon success, SR_ERR upon failure. Upon errors, the * 'analog' variable contents are undefined and should not be used. */ -SR_PRIV int sr_eev121gw_parse(const uint8_t *buf, float *floatval, +static int sr_eev121gw_parse(const uint8_t *buf, float *floatval, struct sr_datafeed_analog *analog, void *info) { struct eev121gw_info *info_local; @@ -1027,7 +1025,7 @@ SR_PRIV int sr_eev121gw_parse(const uint8_t *buf, float *floatval, /* * Get those fields which correspond to the secondary * display. The value's mantissa has 16 bits. The sign - * is separate is only applies to some of the modes. + * is separate and only applies to some of the modes. * Scaling and precision also depend on the mode. The * interpretation of the secondary display is different * from the main display: The 'range' is not an index @@ -1069,36 +1067,6 @@ SR_PRIV int sr_eev121gw_parse(const uint8_t *buf, float *floatval, } is_k = FIELD_NB(raw_sub_range, SUB_RANGE_K); - /* - * TODO: Re-check the power mode display as more data becomes - * available. - * - * The interpretation of the secondary display in power (VA) - * modes is uncertain. The mode suggests A or uA units but the - * value is supposed to be mA without a reliable condition - * for us to check... - * - * f2 17 84 21 21 18 02 00 00 01 04 00 0b 00 00 0a 40 00 3f - * f2 17 84 21 21 18 02 00 00 15 03 00 00 00 00 0a 40 00 27 - * DC VA DC V / DC A - * 25.000VA dot 4 / dot 3 - * - * f2 17 84 21 21 18 00 00 26 01 04 4c 57 00 00 0e 40 00 0f - * f2 17 84 21 21 18 00 00 26 15 02 00 c7 00 00 0e 40 00 c1 - * 3.8mVA DC 1.9543V - * 1.98mA (!) DC A + dot 2 -> milli(!) amps? - * - * f2 17 84 21 21 17 00 07 85 01 04 4c 5a 00 00 0e 40 00 a9 - * f2 17 84 21 21 17 00 07 85 13 04 26 7b 00 00 0e 40 00 f0 - * 1.925mVA DC 1.9546V - * 0.9852mA - * - * f2 17 84 21 21 16 02 11 e0 01 04 26 39 00 02 0e 40 00 d2 - * f2 17 84 21 21 16 02 11 e0 11 04 12 44 00 02 0e 40 00 8b - * 457.6uVA DC 0.9785V - * 0.4676mA (!) DC uA + dot 4 -> milli(!) amps? - */ - switch (sub_mode) { case MODE_DC_V: info_local->is_voltage = TRUE;