Template:Application

From WebOS Internals
Revision as of 01:17, 7 August 2009 by Egaudet (talk | contribs) (Add summary/description)
Jump to navigation Jump to search
[[Portal:{{{type}}}_Applications_{{{tag}}}|« Go Back to the {{{tag}}} application list]]
[[Image:{{{screenshot}}}|180px]]
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.

Usage

Remember to use the {{!}} for "|" when in the description parameter.

<source lang="text">

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.

Usage

Remember to use the {{!}} for "|" when in the description parameter.

<source lang="text"> Template loop detected: Template:Application </source> </noinclude> </source>