On Tuesday, September 2, 2014 5:14:12 AM UTC+2, Jonas Sicking wrote:
> Yeah, we've known about this problem for a while. Fortunately we've
> 
> been able to finally get a discussion going about how to address this.
> 
> The discussion is happening on public-webapps list at W3C I believe.
> 
> 
> 
> / Jonas
> 
> 
> 
> On Mon, Sep 1, 2014 at 2:10 PM, Jan Jongboom <[email protected]> wrote:
> 
> > At the moment we only expose proximity values through events, but I'm 
> > wondering whether we can also make this available 'on demand'.
> 
> >
> 
> > If so, can someone give me some pointers? I can't find the proximity 
> > handling code for Gonk in dom/system/gonk or widget/gonk.
> 
> > _______________________________________________
> 
> > dev-b2g mailing list
> 
> > [email protected]
> 
> > https://lists.mozilla.org/listinfo/dev-b2g

Hi Jonas,

I was thinking how I could implement this. As far as I understand the code for 
dealing with the sensors live in separate repo per manufacturer, which makes 
sense and is autoconfigured by config.sh in b2g and ends up in libhardware 
folder. In here there are sensors that have cpp & header files that inherit 
from SensorBase. So far so good. Now the problem there is that there is no way 
of retrieving a set value from the interface (e.g. 
https://github.com/gp-b2g/hardware_libhardware/blob/master/modules/sensors/ProximitySensor.h)

It would be easy to implement this (on Peak enable sensor if needed, read 
./distance, disable sensor if needed) but we need to add it to the API to be 
able to consume this. But if we want to add this we would add it to the 
interface and it would not be implemented by almost all devices, so I don't 
really know how to progress. Maybe add a new type ProximitySensor2 or something 
and then check in GonkSensor.cpp whether the sensor is the new type, and then 
only expose a new API to content process if that's the case.

What do you think?
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to