summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsensors/sensors.cpp39
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;