Lines Matching refs:list

72 /* Base values for the sensor list, these need to be in the order defined in MPLSensor.h */
167 /* sensor list will be changed based on this variable */
476 /* this variable is used for coming up with sensor list */
1108 /** fill in the sensor list based on which sensors are configured.
1110 * parameter list must point to a memory region of at least 7*sizeof(sensor_t)
1111 * parameter len gives the length of the buffer pointed to by list
1114 int MPLSensor::populateSensorList(struct sensor_t *list, int len)
1119 ALOGE("sensor list too small, not populating.");
1124 memcpy(list, sSensorList, sizeof (struct sensor_t) * 7);
1126 /* first add gyro, accel and compass to the list */
1134 fillAccel(accelId, list);
1142 fillCompass(compassId, list);
1145 fillGyro(MPU_NAME, list);
1150 /* all sensors will be added to the list */
1152 fillOrientation(list);
1155 fillRV(list);
1158 fillGravity(list);
1161 fillLinearAccel(list);
1163 /* no 9-axis sensors, zero fill that part of the list */
1165 memset(list+3, 0, 4*sizeof(struct sensor_t));
1171 void MPLSensor::fillAccel(unsigned char accel, struct sensor_t *list)
1175 list[Accelerometer].maxRange = ACCEL_LIS331_RANGE;
1176 list[Accelerometer].resolution = ACCEL_LIS331_RESOLUTION;
1177 list[Accelerometer].power = ACCEL_LIS331_POWER;
1181 list[Accelerometer].maxRange = ACCEL_LIS3DH_RANGE;
1182 list[Accelerometer].resolution = ACCEL_LIS3DH_RESOLUTION;
1183 list[Accelerometer].power = ACCEL_LIS3DH_POWER;
1187 list[Accelerometer].maxRange = ACCEL_KXSD9_RANGE;
1188 list[Accelerometer].resolution = ACCEL_KXSD9_RESOLUTION;
1189 list[Accelerometer].power = ACCEL_KXSD9_POWER;
1193 list[Accelerometer].maxRange = ACCEL_KXTF9_RANGE;
1194 list[Accelerometer].resolution = ACCEL_KXTF9_RESOLUTION;
1195 list[Accelerometer].power = ACCEL_KXTF9_POWER;
1199 list[Accelerometer].maxRange = ACCEL_BMA150_RANGE;
1200 list[Accelerometer].resolution = ACCEL_BMA150_RESOLUTION;
1201 list[Accelerometer].power = ACCEL_BMA150_POWER;
1205 list[Accelerometer].maxRange = ACCEL_BMA222_RANGE;
1206 list[Accelerometer].resolution = ACCEL_BMA222_RESOLUTION;
1207 list[Accelerometer].power = ACCEL_BMA222_POWER;
1211 list[Accelerometer].maxRange = ACCEL_BMA250_RANGE;
1212 list[Accelerometer].resolution = ACCEL_BMA250_RESOLUTION;
1213 list[Accelerometer].power = ACCEL_BMA250_POWER;
1217 list[Accelerometer].maxRange = ACCEL_ADXL34X_RANGE;
1218 list[Accelerometer].resolution = ACCEL_ADXL34X_RESOLUTION;
1219 list[Accelerometer].power = ACCEL_ADXL34X_POWER;
1223 list[Accelerometer].maxRange = ACCEL_MMA8450_RANGE;
1224 list[Accelerometer].maxRange = ACCEL_MMA8450_RANGE;
1225 list[Accelerometer].maxRange = ACCEL_MMA8450_RANGE;
1229 list[Accelerometer].maxRange = ACCEL_MMA845X_RANGE;
1230 list[Accelerometer].resolution = ACCEL_MMA845X_RESOLUTION;
1231 list[Accelerometer].power = ACCEL_MMA845X_POWER;
1235 list[Accelerometer].maxRange = ACCEL_MPU6050_RANGE;
1236 list[Accelerometer].resolution = ACCEL_MPU6050_RESOLUTION;
1237 list[Accelerometer].power = ACCEL_MPU6050_POWER;
1245 void MPLSensor::fillCompass(unsigned char compass, struct sensor_t *list)
1249 list[MagneticField].maxRange = COMPASS_AKM8975_RANGE;
1250 list[MagneticField].resolution = COMPASS_AKM8975_RESOLUTION;
1251 list[MagneticField].power = COMPASS_AKM8975_POWER;
1254 list[MagneticField].maxRange = COMPASS_AMI30X_RANGE;
1255 list[MagneticField].resolution = COMPASS_AMI30X_RESOLUTION;
1256 list[MagneticField].power = COMPASS_AMI30X_POWER;
1259 list[MagneticField].maxRange = COMPASS_AMI306_RANGE;
1260 list[MagneticField].resolution = COMPASS_AMI306_RESOLUTION;
1261 list[MagneticField].power = COMPASS_AMI306_POWER;
1264 list[MagneticField].maxRange = COMPASS_YAS529_RANGE;
1265 list[MagneticField].resolution = COMPASS_AMI306_RESOLUTION;
1266 list[MagneticField].power = COMPASS_AMI306_POWER;
1269 list[MagneticField].maxRange = COMPASS_YAS530_RANGE;
1270 list[MagneticField].resolution = COMPASS_YAS530_RESOLUTION;
1271 list[MagneticField].power = COMPASS_YAS530_POWER;
1274 list[MagneticField].maxRange = COMPASS_HMC5883_RANGE;
1275 list[MagneticField].resolution = COMPASS_HMC5883_RESOLUTION;
1276 list[MagneticField].power = COMPASS_HMC5883_POWER;
1279 list[MagneticField].maxRange = COMPASS_MMC314X_RANGE;
1280 list[MagneticField].resolution = COMPASS_MMC314X_RESOLUTION;
1281 list[MagneticField].power = COMPASS_MMC314X_POWER;
1284 list[MagneticField].maxRange = COMPASS_HSCDTD002B_RANGE;
1285 list[MagneticField].resolution = COMPASS_HSCDTD002B_RESOLUTION;
1286 list[MagneticField].power = COMPASS_HSCDTD002B_POWER;
1289 list[MagneticField].maxRange = COMPASS_HSCDTD004A_RANGE;
1290 list[MagneticField].resolution = COMPASS_HSCDTD004A_RESOLUTION;
1291 list[MagneticField].power = COMPASS_HSCDTD004A_POWER;
1298 void MPLSensor::fillGyro(const char* gyro, struct sensor_t *list)
1301 list[Gyro].maxRange = GYRO_MPU3050_RANGE;
1302 list[Gyro].resolution = GYRO_MPU3050_RESOLUTION;
1303 list[Gyro].power = GYRO_MPU3050_POWER;
1305 list[Gyro].maxRange = GYRO_MPU6050_RANGE;
1306 list[Gyro].resolution = GYRO_MPU6050_RESOLUTION;
1307 list[Gyro].power = GYRO_MPU6050_POWER;
1313 /* fillRV depends on values of accel and compass in the list */
1314 void MPLSensor::fillRV(struct sensor_t *list)
1317 list[RotationVector].power = list[Gyro].power + list[Accelerometer].power
1318 + list[MagneticField].power;
1319 list[RotationVector].resolution = .00001;
1320 list[RotationVector].maxRange = 1.0;
1324 void MPLSensor::fillOrientation(struct sensor_t *list)
1326 list[Orientation].power = list[Gyro].power + list[Accelerometer].power
1327 + list[MagneticField].power;
1328 list[Orientation].resolution = .00001;
1329 list[Orientation].maxRange = 360.0;
1333 void MPLSensor::fillGravity( struct sensor_t *list)
1335 list[Gravity].power = list[Gyro].power + list[Accelerometer].power
1336 + list[MagneticField].power;
1337 list[Gravity].resolution = .00001;
1338 list[Gravity].maxRange = 9.81;
1342 void MPLSensor::fillLinearAccel(struct sensor_t *list)
1344 list[Gravity].power = list[Gyro].power + list[Accelerometer].power
1345 + list[MagneticField].power;
1346 list[Gravity].resolution = list[Accelerometer].resolution;
1347 list[Gravity].maxRange = list[Accelerometer].maxRange;