mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 01:31:44 +00:00
HID: wiimote: fix weight conversion error for values > 17kg
Signed-off-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
3155a09fd5
commit
a2f6e4e009
@ -585,7 +585,8 @@ static void handler_balance_board(struct wiimote_ext *ext, const __u8 *payload)
|
||||
} else {
|
||||
tmp = val[i] - ext->calib[i][1];
|
||||
tmp *= 1700;
|
||||
tmp /= ext->calib[i][2] - ext->calib[i][1] + 1700;
|
||||
tmp /= ext->calib[i][2] - ext->calib[i][1];
|
||||
tmp += 1700;
|
||||
}
|
||||
val[i] = tmp;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user