Proposed Sensor API

Joseba created a sensor API that supports Android sensors, and is well done
with respect to how it would integrate into SDL.
http://bugzilla.libsdl.org/show_bug.cgi?id=1717

Do people feel like this is a useful API to add to SDL? Does it cover the
range of sensor capabilities that we’re likely to support?

Cheers!

It looks very good to me, except that I think accelerometers and such
should by default be detected as sensors instead of joysticks. It might
break some apps out there, but SDL 2.0 is still developing and this seems
like the “right” way.

Jonny DOn Tue, Feb 19, 2013 at 9:29 AM, Sam Lantinga wrote:

Joseba created a sensor API that supports Android sensors, and is well
done with respect to how it would integrate into SDL.
http://bugzilla.libsdl.org/show_bug.cgi?id=1717

Do people feel like this is a useful API to add to SDL? Does it cover the
range of sensor capabilities that we’re likely to support?

Cheers!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

2013/2/19 Sam Lantinga

Joseba created a sensor API that supports Android sensors, and is well
done with respect to how it would integrate into SDL.
http://bugzilla.libsdl.org/show_bug.cgi?id=1717

Do people feel like this is a useful API to add to SDL? Does it cover the
range of sensor capabilities that we’re likely to support?

Cheers!

It looks great indeed. If I were to get picky, some sort of
SDL_SENSORCHANGED event would be nice…but I suppose that can be tacked
on later eventually.–
Gabriel.

Would SDL_SENSORCHANGED be sent when the sensor value changes? I think
that’d be way too frequent for some sensors, especially for when you’re not
even using the sensors (e.g. temporarily).

Jonny DOn Tue, Feb 19, 2013 at 10:03 AM, Gabriel Jacobo wrote:

2013/2/19 Sam Lantinga

Joseba created a sensor API that supports Android sensors, and is well
done with respect to how it would integrate into SDL.
http://bugzilla.libsdl.org/show_bug.cgi?id=1717

Do people feel like this is a useful API to add to SDL? Does it cover
the range of sensor capabilities that we’re likely to support?

Cheers!

It looks great indeed. If I were to get picky, some sort of
SDL_SENSORCHANGED event would be nice…but I suppose that can be tacked
on later eventually.

Gabriel.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi,

I decided not to send events since most of the sensors in your device
provide a continuous stream of data (even >100Hz, for what I’ve read).
I believe it just makes sense to assume your sensor readings have
changed at all times.

JosebaOn Tue, Feb 19, 2013 at 4:23 PM, Jonathan Dearborn wrote:

Would SDL_SENSORCHANGED be sent when the sensor value changes? I think
that’d be way too frequent for some sensors, especially for when you’re not
even using the sensors (e.g. temporarily).

Jonny D

On Tue, Feb 19, 2013 at 10:03 AM, Gabriel Jacobo wrote:

2013/2/19 Sam Lantinga

Joseba created a sensor API that supports Android sensors, and is well
done with respect to how it would integrate into SDL.
http://bugzilla.libsdl.org/show_bug.cgi?id=1717

Do people feel like this is a useful API to add to SDL? Does it cover
the range of sensor capabilities that we’re likely to support?

Cheers!

It looks great indeed. If I were to get picky, some sort of
SDL_SENSORCHANGED event would be nice…but I suppose that can be tacked on
later eventually.

Gabriel.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org