Re: [PATCH] Apple Motion Sensor driver

From: Johannes Berg
Date: Mon Nov 13 2006 - 16:26:24 EST



> The fact that the accelerometer offers a (low res) joystick emulation is
> only a nice hack and I'm not even sure somebody (except Johannes) will
> find an use for it.

Heh. Well I think it's fun once a while :)

On Mon, 2006-11-13 at 21:52 +0100, Stelian Pop wrote:
>
> + x -= ams_info.xcalib;
> + y -= ams_info.ycalib;
> + z -= ams_info.zcalib;
> +
> + input_report_abs(ams_info.idev, ABS_X, invert ? -x : x);
> + input_report_abs(ams_info.idev, ABS_Y, invert ? -y : y);
> + input_report_abs(ams_info.idev, ABS_Z, z - ams_info.zcalib);

You're double-calibrating z now, which is surely not what was intended.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part