On Thu, Jan 15, 2009 at 1:04 PM, Ken Schultz <[email protected]> wrote:
>
> Mathias,
>
> I am looking to use the cupcake version of sensors.h for the sensor
> HAL
> layer.
>
>>In "theory", all you need to do is implement a sensor HAL module
>>properly (as documented in sensors.h. pay extreme attention to the
>>definition of the axis and units). Unfortunately, in the current git
>>repository there are no sample code of a sensor HAL module, which
>>makes this task more difficult; however we will fix this problem soon
>>by including the G1 HAL module source code, stay tuned.
>
> When might the G1 version of the cupcake HAL layer be available as a
> reference?

Soon. I don't have an exact ETA.

> Are there any other guidelines/documentation for the
> cupcake sensor HAL other than the comments in sensors.h?

No. sensors.h currently *is* the documentation. I'll be happy to
answer questions here if need be.


Mathias


>
> Thanks,
> Ken
>
> On Jan 9, 1:26 am, Mathias Agopian <[email protected]> wrote:
>> Hi,
>>
>> Android doesn't "require" yaw / pitch / roll per se. In theory, well
>> written applications should check for the presence of these sensors.
>> Unfortunately, in Android 1.0 there wasn't an easy way to integrate a
>> new sensor h/w.
>>
>> I think it is more sane to target the "cupcake" release of Android,
>> which a work in progress is available in the main git repository.
>>
>> Future (cupcake) applications will be able to  use the SensorManager
>> to calculate the yaw / pitch / roll from the acceleration and magnetic
>> data (this is actually more precise than the data coming out of the
>> driver!). Additionnaly, there is a HAL module to implement your sensor
>> h/w which describes precisely what is expected from the higher layers
>> (see sensors.h).
>>
>> A sensor h/w can expose yaw/pitch/roll if it wants to, but is not
>> technically required; the framework will expose a "fake"
>> yaw/pitch/roll sensors if one is not published by the sensor HAL and
>> if Acceleration and Magnetic data are available.
>>
>> Note that the definition of the axis at the h/w level have changed
>> between 1.0 and cupcake, so be sure to read carefully the
>> documentation in sensors.h.
>>
>> Android doesn't do ANY calibration on its own. The drivers and/or HAL
>> modules are expected to do this.
>>
>> In "theory", all you need to do is implement a sensor HAL module
>> properly (as documented in sensors.h. pay extreme attention to the
>> definition of the axis and units). Unfortunately, in the current git
>> repository there are no sample code of a sensor HAL module, which
>> makes this task more difficult; however we will fix this problem soon
>> by including the G1 HAL module source code, stay tuned.
>>
>> I hope this helps.
>>
>> Mathias
>>
>> On Thu, Jan 8, 2009 at 9:45 PM, pramod gurav <[email protected]> wrote:
>>
>> > Hi All,
>> > I am trying to integrate my compass and accelerometer sensors into android.
>> > These are two different sensors which support only providing magnetic
>> > x, y, z and
>> > acceleration in x, y and z direction. As I gone through the HAL layer
>> > of android I
>> > could know that android expects yaw, pitch, row also from the under
>> > lying driver.
>> > I just wanted to conform this as the sensors we are using does not
>> > give any values
>> > other than above mentioned.
>> > I would also like to know whether android does any calibration on its
>> > own to get these
>> > values in case these are not supported by hardware.
>> > Please let me know if I need to provide more details regarding my sensors.
>>
>> > --
>> > Best Regards
>> > Pramod
> >
>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to