From: Florian Echtler <floe@butterbrot.org>
To: David Herrmann <dh.herrmann@googlemail.com>
Cc: linux-input@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH 2/2] HID: wiimote: Parse calibration data of balance boards
Date: Mon, 17 Sep 2012 17:21:04 +0200 [thread overview]
Message-ID: <50573FE0.6000003@butterbrot.org> (raw)
In-Reply-To: <1347877896-23939-2-git-send-email-dh.herrmann@googlemail.com>
Darn, I just realized there may be an error here:
On 17.09.2012 12:31, David Herrmann wrote:
> drivers/hid/hid-wiimote-ext.c | 39 ++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 38 insertions(+), 1 deletion(-)
>
> + /* apply calibration data */
> + for (i = 0; i < 4; i++) {
> + if (val[i] < ext->calib[i][1]) {
> + tmp = val[i] - ext->calib[i][0];
> + tmp *= 1700;
> + tmp /= ext->calib[i][1] - ext->calib[i][0];
> + } else {
> + tmp = val[i] - ext->calib[i][1];
> + tmp *= 1700;
> + tmp /= ext->calib[i][2] - ext->calib[i][1] + 1700;
I think this is not exactly the same formula as in my original patch;
I'm quite sure this should read:
tmp /= ext->calib[i][2] - ext->calib[i][1];
tmp += 1700;
instead.
Florian
--
SENT FROM MY PDP-11
next prev parent reply other threads:[~2012-09-17 15:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 10:31 [PATCH 1/2] HID: wiimote: Add Nintendo Balance-Board support David Herrmann
2012-09-17 10:31 ` [PATCH 2/2] HID: wiimote: Parse calibration data of balance boards David Herrmann
2012-09-17 15:04 ` Florian Echtler
2012-09-17 15:23 ` Jiri Kosina
2012-09-17 15:21 ` Florian Echtler [this message]
2012-09-17 15:26 ` Jiri Kosina
2012-09-17 15:05 ` [PATCH 1/2] HID: wiimote: Add Nintendo Balance-Board support Florian Echtler
2012-09-17 15:22 ` Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50573FE0.6000003@butterbrot.org \
--to=floe@butterbrot.org \
--cc=dh.herrmann@googlemail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.