#define SENSOR_TYPE_ORIENTATION "ORIENTATION"
#define MS_TO_US 1000
+#define MIN_DELIVERY_DIFF_FACTOR 0.75f
#define ELEMENT_NAME "NAME"
#define ELEMENT_VENDOR "VENDOR"
pitch = event.data.values[1];
roll = event.data.values[2];
- const float MIN_DELIVERY_DIFF_FACTOR = 0.75f;
unsigned long long diff_time;
if(m_orientation_data_unit == "DEGREES") {
#include <thread>
#include <chrono>
+#define MS_TO_US 1000
+#define MIN_DELIVERY_DIFF_FACTOR 0.75f
+
using std::thread;
using std::pair;
void csensor_event_listener::handle_events(void* event)
{
- const unsigned int MS_TO_US = 1000;
- const float MIN_DELIVERY_DIFF_FACTOR = 0.75f;
-
unsigned long long cur_time;
creg_event_info *event_info = NULL;
sensor_event_data_t event_data;
#define GRAVITY 9.80665
#define MS_TO_US 1000
+#define MIN_DELIVERY_DIFF_FACTOR 0.75f
#define ACCELEROMETER_ENABLED 0x01
#define GRAVITY_ENABLED 0x02
{
sensor_event_t lin_accel_event;
- const float MIN_DELIVERY_DIFF_FACTOR = 0.75f;
unsigned long long diff_time;
if (event.event_type == ACCELEROMETER_EVENT_RAW_DATA_REPORT_ON_TIME) {
#define INITIAL_VALUE -1
#define MS_TO_US 1000
+#define MIN_DELIVERY_DIFF_FACTOR 0.75f
#define PI 3.141593
#define AZIMUTH_OFFSET_DEGREES 360
void orientation_sensor::synthesize(const sensor_event_t &event, vector<sensor_event_t> &outs)
{
- const float MIN_DELIVERY_DIFF_FACTOR = 0.75f;
unsigned long long diff_time;
sensor_event_t orientation_event;