Difference between revisions of "Application:AccelService"
m |
|||
(7 intermediate revisions by 4 users not shown) | |||
Line 2: | Line 2: | ||
|name=AccelService | |name=AccelService | ||
|type=webOS | |type=webOS | ||
− | |version=Version: Pre-Alpha 0.0. | + | |version=Version: Pre-Alpha 0.0.3 <br />(7 Aug 2009) |
|tag=Utilities | |tag=Utilities | ||
|screenshot= | |screenshot= | ||
|description= | |description= | ||
− | == | + | == Deprecated == |
+ | This service is deprecated, and has been removed from the feeds. WebOS 1.3.5 and above include an official API for adjusting the accelerometer resolution. The StageController.setWindowProperties() method now supports the fastAccelerometer property to increase the frequency of accelerometer events from 4Hz to 30Hz. | ||
+ | == Summary == | ||
+ | This service provides access to the accelerometer driver's poll_interval parameter. As of webOS 1.1.0, this interval is not accessible from application development and is set to 250ms. This makes most accelerometer driven applications choppy and slow. With this service, the poll_interval can be changed dynamically by the application. | ||
+ | |||
+ | The four methods exposed to the user are: | ||
+ | |||
+ | ;getPollFreq() :returns the frequency in HZ of the accelerometer events | ||
+ | ;getPollPeriod() :returns the period in ms of the accelerometer events | ||
+ | ;setPollFreq(freq) :sets the frequency in HZ of the accelerometer events | ||
+ | ;setPollPeriod(period) :sets the period in ms of the accelerometer events | ||
+ | |||
+ | '''NOTE:''' This service does not modify the hardware, it simply increases the rate at which the driver sends accelerometer events to the application handlers listening for the 'acceleration' event. | ||
== Status == | == Status == | ||
Line 20: | Line 32: | ||
Source code for the example Mojo app can be browsed at http://gitorious.org/webos-internals/applications/trees/master/org.webosinternals.accelexample | Source code for the example Mojo app can be browsed at http://gitorious.org/webos-internals/applications/trees/master/org.webosinternals.accelexample | ||
− | Source code for the service can be browsed at http://gitorious.org/webos-internals/applications/trees/master/ | + | Source code for the service can be browsed at http://gitorious.org/webos-internals/applications/trees/master/AccelerometerService |
== License == | == License == | ||
Line 36: | Line 48: | ||
== Installation == | == Installation == | ||
− | + | You can install it from Preware. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} |
Latest revision as of 22:59, 20 January 2010
AccelService - Version: Pre-Alpha 0.0.3
(7 Aug 2009)
Deprecated
This service is deprecated, and has been removed from the feeds. WebOS 1.3.5 and above include an official API for adjusting the accelerometer resolution. The StageController.setWindowProperties() method now supports the fastAccelerometer property to increase the frequency of accelerometer events from 4Hz to 30Hz.
Summary
This service provides access to the accelerometer driver's poll_interval parameter. As of webOS 1.1.0, this interval is not accessible from application development and is set to 250ms. This makes most accelerometer driven applications choppy and slow. With this service, the poll_interval can be changed dynamically by the application.
The four methods exposed to the user are:
- getPollFreq()
- returns the frequency in HZ of the accelerometer events
- getPollPeriod()
- returns the period in ms of the accelerometer events
- setPollFreq(freq)
- sets the frequency in HZ of the accelerometer events
- setPollPeriod(period)
- sets the period in ms of the accelerometer events
NOTE: This service does not modify the hardware, it simply increases the rate at which the driver sends accelerometer events to the application handlers listening for the 'acceleration' event.
Status
This is early-alpha software.
Repository
AccelService is housed in the Applications section of the Webos-internals repository at Gitorious. http://gitorious.org/webos-internals.
Source code for the example Mojo app can be browsed at http://gitorious.org/webos-internals/applications/trees/master/org.webosinternals.accelexample
Source code for the service can be browsed at http://gitorious.org/webos-internals/applications/trees/master/AccelerometerService
License
Please be aware that org.webosinternals.accelservice and org.webosinternals.accelexample are licensed under the GPLv2.
They cannot be used by a closed source application. If you want to use them in a non-GPLv2 but otherwise open source application, please contact the authors.
Operating notes
Recent enhancements
Known bugs
Installation
You can install it from Preware.