Determine whether the compass heading is flipped.
#include <bps/sensor.h>
BPS_API int sensor_event_is_heading_flipped(bps_event_t *event,
bool *is_flipped)
BlackBerry 10.2.0
The SENSOR_COMPASS_READING event to get the value from.
This is set to true if the device is face down, false otherwise.
The sensor_event_is_heading_flipped() function sets is_flipped to true if the device is face down. When the device is face down, turning the device clockwise will report the same heading as turning it counter-clockwise if the device was face up. is_flipped is set to false if the device is face up and the heading is not flipped. The value is retrieved from a SENSOR_COMPASS_READING event.
On success, BPS_SUCCESS is returned and is_flipped is set. If the event passed in is not a SENSOR_COMPASS_READING event or if is_flipped is NULL, BPS_FAILURE will be returned with errno set appropriately.