Accelges status
Nicola Mfb
nicola.mfb at gmail.com
Mon Jun 8 19:59:24 CEST 2009
On Mon, Jun 8, 2009 at 7:37 PM, Paul V. Borza<paul at borza.ro> wrote:
> Hi Nicola,
>
Hi Paul!
thanks for feedback!
> You're free to use the code that's available on
> http://code.google.com/p/accelges/
> The one from accelsense.org needs heavy restructuring and I don't
> recommend using it.
I'm not sure but reading your code I found in accelneo.c the following snippet:
unsigned short int rel = *(unsigned short int *)(report + 8);
/*
* Neo sends three reports on X, Y, and Z with rel = 2
* and another one (as a separator) with rel = 0
*/
if (rel == 2)
{
unsigned short int axis_ind = *(short int
*)(report + 10);
/* receives signed acceleration in milli-G */
int val_mg = *(int *)(report + 12);
/* convert acceleration to G */
float val_g = (float)val_mg / 1000.0;
/* save to accel on the axis */
accel.val[axis_ind] = val_g;
}
and according to
http://wiki.openmoko.org/wiki/Accelerometer_data_retrieval old apps
should be patched to work with absolute accelerometers values.
> The work I've done at accelges was for my Bachelor's thesis and GSoC 2008.
>
> I will continue working at gesture recognition in autumn for my master's thesis.
> Any questions you may have, I'm here to answer.
Thanks, we'll wait for you :))
Unless I misunderstood the problem may you write and commit a little
patch to handle rel=3 events too?
Best Regards
Nicola
More information about the community
mailing list