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.
This commit is contained in:
parent
4d2630e63a
commit
e1f9f1e1f2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue