>From: Zhao, Forrest [mailto:forrest.z...@intel.com]
>Sent: Monday, February 28, 2011 11:10 PM
>Subject: RE: How to make SelectMode/IntervalMode configurable for
>gyroscope sensor adaptor?
>
>> >I started to rebase the patches against 0.7.0. And have a question about
>> >gyroscope adaptor code.
>> >
>> >bool GyroscopeAdaptor::setInterval(const unsigned int value, const int
>> >sessionId)
>> >{
>> >    return SysfsAdaptor::setInterval((value > 10 ? 10 : value), sessionId);
>> >}
>> >
>> >May I know why the largest polling interval is limited to 10 millisecond?
>> >
>> >Or if this polling interval limitation is required for l3g4200dh, I plan to
>> introduce
>> >a "driver_type" parameter to gyroscopeadaptor.cpp to pass through this
>> >limitation for the gyroscope sensor on my device. Please let me know if
>you
>> >have different idea.
>>
>> Tbh, I have absolutely no idea where that comes from. As the adaptor uses
>> SelectMode, there is no point in calling sysfsAdaptor::setInterval(), as that
>only
>> affects things for PollMode. Adaptors in SelectMode should reimplement
>> interval() and setInterval() to handle the driver correctly. That piece of 
>> code
>> does not have any effect on behavior.
>>
>> I suggest you consider the gyro adaptor to be incomplete, and freely
>implement
>> the interval handling as you see fit.
>>
>
>Could you please review the attached patch for gyroscope adaptor?
>
>This patch eliminates the 10 millisecond limitation of polling interval. Then 
>the
>gyroscope adaptor can work very well with my gyroscope sensor driver
>working under IntervalMode.

That works. In the meantime we already managed to push in a small change for 
handling intervals in SelectMode, so we will input this behavior along with 
that one instead of directly applying the patch.

// Timo
_______________________________________________
MeeGo-dev mailing list
MeeGo-dev@meego.com
http://lists.meego.com/listinfo/meego-dev
http://wiki.meego.com/Mailing_list_guidelines

Reply via email to