{
m_name = string(SENSOR_NAME);
- register_supported_event(AUTO_ROTATION_EVENT_CHANGE_STATE);
+ register_supported_event(AUTO_ROTATION_CHANGE_STATE_EVENT);
}
auto_rotation_sensor::~auto_rotation_sensor()
INFO("Rotation: %d, ACC[0]: %f, ACC[1]: %f, ACC[2]: %f", rotation, event.data.values[0], event.data.values[1], event.data.values[2]);
rotation_event.sensor_id = get_id();
rotation_event.data.accuracy = SENSOR_ACCURACY_GOOD;
- rotation_event.event_type = AUTO_ROTATION_EVENT_CHANGE_STATE;
+ rotation_event.event_type = AUTO_ROTATION_CHANGE_STATE_EVENT;
rotation_event.data.timestamp = event.data.timestamp;
rotation_event.data.values[0] = rotation;
rotation_event.data.value_count = 1;
int auto_rotation_sensor::get_sensor_data(unsigned int data_id, sensor_data_t &data)
{
- if (data_id != AUTO_ROTATION_BASE_DATA_SET)
+ if (data_id != AUTO_ROTATION_CHANGE_STATE_EVENT)
return -1;
AUTOLOCK(m_value_mutex);
FILL_LOG_ELEMENT(LOG_ID_EVENT, PROXIMITY_STATE_EVENT, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, PROXIMITY_DISTANCE_DATA_EVENT, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, CONTEXT_EVENT_REPORT, 0, 1),
- FILL_LOG_ELEMENT(LOG_ID_EVENT, AUTO_ROTATION_EVENT_CHANGE_STATE, 0, 1),
+ FILL_LOG_ELEMENT(LOG_ID_EVENT, AUTO_ROTATION_CHANGE_STATE_EVENT, 0, 1),
FILL_LOG_ELEMENT(LOG_ID_EVENT, ACCELEROMETER_RAW_DATA_EVENT, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, GYROSCOPE_RAW_DATA_EVENT, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, GEOMAGNETIC_RAW_DATA_EVENT, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_DATA, LIGHT_BASE_DATA_SET, 0, 25),
FILL_LOG_ELEMENT(LOG_ID_DATA, LIGHT_LUX_DATA_SET, 0, 25),
FILL_LOG_ELEMENT(LOG_ID_DATA, CONTEXT_BASE_DATA_SET, 0, 25),
- FILL_LOG_ELEMENT(LOG_ID_DATA, AUTO_ROTATION_BASE_DATA_SET, 0, 25),
FILL_LOG_ELEMENT(LOG_ID_DATA, GRAVITY_BASE_DATA_SET, 0, 25),
FILL_LOG_ELEMENT(LOG_ID_DATA, LINEAR_ACCEL_BASE_DATA_SET, 0, 25),
FILL_LOG_ELEMENT(LOG_ID_DATA, ORIENTATION_BASE_DATA_SET, 0, 25),
case GEOMAGNETIC_CALIBRATION_NEEDED_EVENT:
case LIGHT_EVENT_CHANGE_LEVEL:
case PROXIMITY_CHANGE_STATE_EVENT:
- case AUTO_ROTATION_EVENT_CHANGE_STATE:
+ case AUTO_ROTATION_CHANGE_STATE_EVENT:
return true;
break;
}