FILL_LOG_ELEMENT(LOG_ID_EVENT, GEOMAGNETIC_CALIBRATION_NEEDED_EVENT, 0, 1),
FILL_LOG_ELEMENT(LOG_ID_EVENT, PROXIMITY_CHANGE_STATE_EVENT, 0,1),
- FILL_LOG_ELEMENT(LOG_ID_EVENT, LIGHT_EVENT_CHANGE_LEVEL, 0, 1),
+ FILL_LOG_ELEMENT(LOG_ID_EVENT, LIGHT_CHANGE_LEVEL_EVENT, 0, 1),
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, GYROSCOPE_RAW_DATA_EVENT, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, GEOMAGNETIC_RAW_DATA_EVENT, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, PRESSURE_RAW_DATA_EVENT, 0, 10),
- FILL_LOG_ELEMENT(LOG_ID_EVENT, LIGHT_EVENT_LEVEL_DATA_REPORT_ON_TIME, 0, 10),
- FILL_LOG_ELEMENT(LOG_ID_EVENT, LIGHT_EVENT_LUX_DATA_REPORT_ON_TIME, 0, 10),
+ FILL_LOG_ELEMENT(LOG_ID_EVENT, LIGHT_LEVEL_DATA_EVENT, 0, 10),
+ FILL_LOG_ELEMENT(LOG_ID_EVENT, LIGHT_LUX_DATA_EVENT, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, GRAVITY_EVENT_RAW_DATA_REPORT_ON_TIME, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, LINEAR_ACCEL_EVENT_RAW_DATA_REPORT_ON_TIME, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, ORIENTATION_EVENT_RAW_DATA_REPORT_ON_TIME, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, GEOMAGNETIC_RV_RAW_DATA_EVENT, 0, 10),
FILL_LOG_ELEMENT(LOG_ID_EVENT, GAMING_RV_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, GRAVITY_BASE_DATA_SET, 0, 25),
FILL_LOG_ELEMENT(LOG_ID_DATA, LINEAR_ACCEL_BASE_DATA_SET, 0, 25),
case ACCELEROMETER_RAW_DATA_EVENT:
case PROXIMITY_STATE_EVENT:
case GYROSCOPE_RAW_DATA_EVENT:
- case LIGHT_EVENT_LEVEL_DATA_REPORT_ON_TIME:
+ case LIGHT_LEVEL_DATA_EVENT:
case GEOMAGNETIC_RAW_DATA_EVENT:
- case LIGHT_EVENT_LUX_DATA_REPORT_ON_TIME:
+ case LIGHT_LUX_DATA_EVENT:
case PROXIMITY_DISTANCE_DATA_EVENT:
case GRAVITY_EVENT_RAW_DATA_REPORT_ON_TIME:
case LINEAR_ACCEL_EVENT_RAW_DATA_REPORT_ON_TIME:
{
switch (event_type) {
case GEOMAGNETIC_CALIBRATION_NEEDED_EVENT:
- case LIGHT_EVENT_CHANGE_LEVEL:
+ case LIGHT_CHANGE_LEVEL_EVENT:
case PROXIMITY_CHANGE_STATE_EVENT:
case AUTO_ROTATION_CHANGE_STATE_EVENT:
return true;
m_name = string(SENSOR_NAME);
vector<unsigned int> supported_events = {
- LIGHT_EVENT_CHANGE_LEVEL,
- LIGHT_EVENT_LEVEL_DATA_REPORT_ON_TIME,
- LIGHT_EVENT_LUX_DATA_REPORT_ON_TIME,
+ LIGHT_CHANGE_LEVEL_EVENT,
+ LIGHT_LEVEL_DATA_EVENT,
+ LIGHT_LUX_DATA_EVENT,
};
for_each(supported_events.begin(), supported_events.end(),
AUTOLOCK(m_client_info_mutex);
event.sensor_id = get_id();
- if (get_client_cnt(LIGHT_EVENT_LUX_DATA_REPORT_ON_TIME)) {
- event.event_type = LIGHT_EVENT_LUX_DATA_REPORT_ON_TIME;
+ if (get_client_cnt(LIGHT_LUX_DATA_EVENT)) {
+ event.event_type = LIGHT_LUX_DATA_EVENT;
push(event);
}
- if (get_client_cnt(LIGHT_EVENT_LEVEL_DATA_REPORT_ON_TIME)) {
- event.event_type = LIGHT_EVENT_LEVEL_DATA_REPORT_ON_TIME;
+ if (get_client_cnt(LIGHT_LEVEL_DATA_EVENT)) {
+ event.event_type = LIGHT_LEVEL_DATA_EVENT;
raw_to_level(event.data);
push(event);
}
if (m_level != level) {
m_level = level;
- if (get_client_cnt(LIGHT_EVENT_CHANGE_LEVEL)) {
- event.event_type = LIGHT_EVENT_CHANGE_LEVEL;
+ if (get_client_cnt(LIGHT_CHANGE_LEVEL_EVENT)) {
+ event.event_type = LIGHT_CHANGE_LEVEL_EVENT;
raw_to_level(event.data);
push(event);
}
if (ret < 0)
return -1;
- if (type == LIGHT_LUX_DATA_SET)
+ if (type == LIGHT_LUX_DATA_EVENT)
return 0;
- if (type == LIGHT_BASE_DATA_SET) {
+ if (type == LIGHT_LEVEL_DATA_EVENT) {
raw_to_level(data);
return 0;
}