PDL_PollActiveSensors
Description
Same as PDL_PollSensor, but returns the first event available for all the currently enabled sensors. Before being polled, a sensor must be enabled with PDL_EnableSensor.
For this API, you are required to pass a pointer to an allocated PDL_SensorEvent struct. The sensor event data is then returned in this struct.
This API gives back an event of type PDL_SENSOR_NONE if no events are available.
Syntax
PDL_Err PDL_PollActiveSensors(PDL_SensorEvent *event);
| Argument | Description |
|---|---|
| *event |
Pointer to PDL_SensorEvent struct.
|
Returns
PDL_INVALIDINPUT - The event parameter is NULL. PDL_NOERROR - There is an event or all active sensors were polled and there was no event.
Note: In all cases where an error is returned, your app can call PDL_GetError to get a plain-text error description. This is usually more informative than the returned error code.
See also: