From: Aurelien Jacobs Date: Sun, 29 Dec 2013 16:07:42 +0000 (+0100) Subject: es519xx: fix switching between frequency and duty cycle mode on 14 bytes chips X-Git-Tag: libsigrok-0.3.0~366 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e1f9f1e1f2c64e9501ba2ef79670b5e26f220ffe;p=libsigrok.git es519xx: fix switching between frequency and duty cycle mode on 14 bytes chips Here is what the datasheet says about this: "If judge bit is 1, it means frequency mode. If judge bit is 0, it means duty cycle mode." But this is plain wrong. Reality proves this is the other way around. --- diff --git a/hardware/common/dmm/es519xx.c b/hardware/common/dmm/es519xx.c index 67d669a5..838592ed 100644 --- a/hardware/common/dmm/es519xx.c +++ b/hardware/common/dmm/es519xx.c @@ -369,9 +369,9 @@ static void parse_flags(const uint8_t *buf, struct es519xx_info *info) case 0x32: /* Frequency / RPM / duty cycle */ if (info->packet_size == 14) { if (info->is_judge) - info->is_frequency = TRUE; - else info->is_duty_cycle = TRUE; + else + info->is_frequency = TRUE; } else { if (info->is_judge) info->is_rpm = TRUE;