Re: [PATCH] HID: wiimote: fix weight conversion error for values > 17kg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 17, 2012 at 9:15 PM, Florian Echtler <floe@xxxxxxxxxxxxxx> wrote:
> Signed-Off-By: Florian Echtler <floe@xxxxxxxxxxxxxx>
> ---
>  drivers/hid/hid-wiimote-ext.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-wiimote-ext.c b/drivers/hid/hid-wiimote-ext.c
> index fc98cc9..bc85bf2 100644
> --- a/drivers/hid/hid-wiimote-ext.c
> +++ b/drivers/hid/hid-wiimote-ext.c
> @@ -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;

That's the reason why I split up your extra long line from the
original :P I should have checked it again. Thanks for the fix. I've
compared it with the original and I messed it up during conversion.
Sorry.

Signed-off-by: David Herrmann <dh.herrmann@xxxxxxxxxxxxxx>

Thanks Jiri for applying them.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux