diff options
author | Kyle Repinski <repinski23@gmail.com> | 2015-11-09 12:57:33 -0600 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-01-17 22:40:59 +0100 |
commit | aeea3ec86137d05eb1285a05e3f1518d0645b87f (patch) | |
tree | 049a0f748990e6091f5627c6d1b3c48a39f4d354 /libsensors | |
parent | f1690f97ba0d95aa73acdc3692bbceb58e6c90bd (diff) | |
download | device_samsung_tuna-aeea3ec86137d05eb1285a05e3f1518d0645b87f.zip device_samsung_tuna-aeea3ec86137d05eb1285a05e3f1518d0645b87f.tar.gz device_samsung_tuna-aeea3ec86137d05eb1285a05e3f1518d0645b87f.tar.bz2 |
libsensors: Cleanup and update sensor struct.
Diffstat (limited to 'libsensors')
-rw-r--r-- | libsensors/sensors.cpp | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp index db6f8af..bee3f7a 100644 --- a/libsensors/sensors.cpp +++ b/libsensors/sensors.cpp @@ -79,31 +79,20 @@ /* The SENSORS Module */ #define LOCAL_SENSORS (4) -static struct sensor_t sSensorList[LOCAL_SENSORS + MPLSensor::numSensors] = { - { "GP2A Light sensor", - "Sharp", - 1, SENSORS_LIGHT_HANDLE, - SENSOR_TYPE_LIGHT, powf(10, 125.0f/ 24.0f) * 4, 1.0f, 0.75f, 0, 0, 0, 0, 0, 0, - SENSOR_FLAG_ON_CHANGE_MODE, - { } }, - { "GP2A Proximity sensor", - "Sharp", - 1, SENSORS_PROXIMITY_HANDLE, - SENSOR_TYPE_PROXIMITY, 5.0f, 5.0f, 0.75f, 0, 0, 0, 0, 0, 0, - SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE, - { } }, - { "BMP180 Pressure sensor", - "Bosch", - 1, SENSORS_PRESSURE_HANDLE, - SENSOR_TYPE_PRESSURE, 1100.0f, 0.01f, 0.67f, 20000, 0, 0, 0, 0, 20000, - SENSOR_FLAG_CONTINUOUS_MODE, - { } }, - { "BMP180 Temperature sensor", - "Bosch", - 1, SENSORS_TEMPERATURE_HANDLE, - SENSOR_TYPE_AMBIENT_TEMPERATURE, 850.0f, 0.1f, 0.67f, 20000, 0, 0, 0, 0, 20000, - SENSOR_FLAG_CONTINUOUS_MODE, - { } } +static struct sensor_t sSensorList[LOCAL_SENSORS + MPLSensor::numSensors] = +{ + {"GP2A Light", "Sharp", 1, SENSORS_LIGHT_HANDLE, + SENSOR_TYPE_LIGHT, powf(10, 125.0f/ 24.0f) * 4, 1.0f, 0.75f, 0, 0, 0, + SENSOR_STRING_TYPE_LIGHT, "", 0, SENSOR_FLAG_ON_CHANGE_MODE, {}}, + {"GP2A Proximity", "Sharp", 1, SENSORS_PROXIMITY_HANDLE, + SENSOR_TYPE_PROXIMITY, 5.0f, 5.0f, 0.75f, 0, 0, 0, + SENSOR_STRING_TYPE_PROXIMITY, "", 0, SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE, {}}, + {"BMP180 Pressure", "Bosch", 1, SENSORS_PRESSURE_HANDLE, + SENSOR_TYPE_PRESSURE, 1100.0f, 0.01f, 0.67f, 20000, 0, 0, + SENSOR_STRING_TYPE_PRESSURE, "", 20000, SENSOR_FLAG_CONTINUOUS_MODE, {}}, + {"BMP180 Temperature", "Bosch", 1, SENSORS_TEMPERATURE_HANDLE, + SENSOR_TYPE_AMBIENT_TEMPERATURE, 850.0f, 0.1f, 0.67f, 20000, 0, 0, + SENSOR_STRING_TYPE_AMBIENT_TEMPERATURE, "", 20000, SENSOR_FLAG_CONTINUOUS_MODE, {}}, }; static int numSensors = LOCAL_SENSORS; |