From e1f9f1e1f2c64e9501ba2ef79670b5e26f220ffe Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Sun, 29 Dec 2013 17:07:42 +0100 Subject: [PATCH] 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. --- hardware/common/dmm/es519xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;