sensor_set_rate()

Set a sensor's refresh rate.

Synopsis:

#include <bps/sensor.h>
 
BPS_API int sensor_set_rate(sensor_type_t type,
                            unsigned int rate)

Since:

BlackBerry 10.0.0

Arguments:

type

The sensor to set the refresh rate for.

rate

The rate to set (in microseconds).

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

The sensor_set_rate() function sets the rate at which the specified sensor should provide updates. The device attempts to achieve the specified rate, but this is not guaranteed; the sensor might provide updates more frequently or less frequently than the specified rate. The rate that you specify here corresponds roughly to the number of sensor events that are delivered to the event queue for your application.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus