So you have a binary prox sensor that reports a zero or one to the
sensor HAL.
The sensor HAL should convert this to some distance in millimeters to
report this to the application layer.
This, in your case, will either be 0 or 9mm.
Do you know how far off the glass the proximity is supposed to
trigger?
Thats what PROXIMITY_THRESHOLD is supposed to be set to.
You also need to tell the Sensor Manager the proximity attributes via
the sensors_t struct.
Incorrectly defined attributes may mean that the value may not be
reported to the application.
Dan
On Apr 21, 9:45 am, jagan <
402ja...@gmail.com> wrote:
> Hi Dan.
>
> Could you please help if you have any inputs on this issue.
>
>
>
>
>
>
>
> On Wed, Apr 20, 20input11 at 10:56 PM, jagan <
402ja...@gmail.com> wrote:
> > Hi Dan.
>
> > For distance event point of view the below are observations
>
> > in my driver:
> > -----------------
>
> > input_set_abs_params(input_dev, ABS_DISTANCE, 0, 1, 0, 0);.
>
> > in my HAL:
> > ----------------
> > I am setting distance as follows
>
> > #define PROXIMTY_THRESHOLD 9.0f
>
> > float indexValue (size_t index) {
> > return index * PROXIMITY_THRESHOLD;
> > }
>
> > pending_event.distance = indexValue(event->value);
>
> > Is there any problem with index calculation in indexValue()? or
> > PROXIMTY_THRESHOLD value is improper?
>
> > Please let me tell me know if you have any inputs.
>
> > Jagan.
>
> > On Wed, Apr 20, 2011 at 9:24 PM, mike digioia <
mpd...@gmail.com> wrote:
>
> >> I think he is saying to check to see that your JNI and app handle the
> >> binary type if you use Binary Attributes in the driver
>
> >> On Wed, Apr 20, 2011 at 8:50 AM, jagan <
402ja...@gmail.com> wrote:
>
> >>> Hi Dan,
>
> >>> I didn't get you what you explain.
>
> >>> Could you please Elaborate.
>
> >>> Jagan.
>