sensor_history_pressure()

Retrieve pressure sensor history.

Synopsis:

#include <sensor/libsensor.h>
 
int sensor_history_pressure(sensor_history_pressure_data_t *data)

Since:

BlackBerry 10.1.0

Arguments:

data

The structure to populate with pressure sensor events.

Library:

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

Description:

This function populates the passed in sensor_history_pressure_data_t structure with the most recently recorded pressure sensor events.

Example usage:
 sensor_history_pressure_data_t data = { 0 };
 sensor_history_pressure(&data);
 int i;
 for (i = 0; i < sizeof(data.element) / sizeof(*data.element); i++) {
     printf("Pressure: %f\n", data.element[i].pressure);
 }

Returns:

EOK on success, an errno value otherwise.