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 */
484 /* this variable is used for coming up with sensor list */
1125 /** fill in the sensor list based on which sensors are configured.
1127 * parameter list must point to a memory region of at least 7*sizeof(sensor_t)
1128 * parameter len gives the length of the buffer pointed to by list
1131 int MPLSensor::populateSensorList(struct sensor_t *list, int len)
1136 LOGE("sensor list too small, not populating.");
1141 memcpy(list, sSensorList, sizeof (struct sensor_t) * 7);
1143 /* first add gyro, accel and compass to the list */
1151 fillAccel(accelId, list);
1159 fillCompass(compassId, list);
1162 fillGyro(MPU_NAME, list);
1167 /* all sensors will be added to the list */
1169 fillOrientation(list);
1172 fillRV(list);
1175 fillGravity(list);
1178 fillLinearAccel(list);
1180 /* no 9-axis sensors, zero fill that part of the list */
1182 memset(list+3, 0, 4*sizeof(struct sensor_t));
1188 void MPLSensor::fillAccel(unsigned char accel, struct sensor_t *list)
1192 list[Accelerometer].maxRange = ACCEL_LIS331_RANGE;
1193 list[Accelerometer].resolution = ACCEL_LIS331_RESOLUTION;
1194 list[Accelerometer].power = ACCEL_LIS331_POWER;
1198 list[Accelerometer].maxRange = ACCEL_LIS3DH_RANGE;
1199 list[Accelerometer].resolution = ACCEL_LIS3DH_RESOLUTION;
1200 list[Accelerometer].power = ACCEL_LIS3DH_POWER;
1204 list[Accelerometer].maxRange = ACCEL_KXSD9_RANGE;
1205 list[Accelerometer].resolution = ACCEL_KXSD9_RESOLUTION;
1206 list[Accelerometer].power = ACCEL_KXSD9_POWER;
1210 list[Accelerometer].maxRange = ACCEL_KXTF9_RANGE;
1211 list[Accelerometer].resolution = ACCEL_KXTF9_RESOLUTION;
1212 list[Accelerometer].power = ACCEL_KXTF9_POWER;
1216 list[Accelerometer].maxRange = ACCEL_BMA150_RANGE;
1217 list[Accelerometer].resolution = ACCEL_BMA150_RESOLUTION;
1218 list[Accelerometer].power = ACCEL_BMA150_POWER;
1222 list[Accelerometer].maxRange = ACCEL_BMA222_RANGE;
1223 list[Accelerometer].resolution = ACCEL_BMA222_RESOLUTION;
1224 list[Accelerometer].power = ACCEL_BMA222_POWER;
1228 list[Accelerometer].maxRange = ACCEL_BMA250_RANGE;
1229 list[Accelerometer].resolution = ACCEL_BMA250_RESOLUTION;
1230 list[Accelerometer].power = ACCEL_BMA250_POWER;
1234 list[Accelerometer].maxRange = ACCEL_ADXL34X_RANGE;
1235 list[Accelerometer].resolution = ACCEL_ADXL34X_RESOLUTION;
1236 list[Accelerometer].power = ACCEL_ADXL34X_POWER;
1240 list[Accelerometer].maxRange = ACCEL_MMA8450_RANGE;
1241 list[Accelerometer].maxRange = ACCEL_MMA8450_RANGE;
1242 list[Accelerometer].maxRange = ACCEL_MMA8450_RANGE;
1246 list[Accelerometer].maxRange = ACCEL_MMA845X_RANGE;
1247 list[Accelerometer].resolution = ACCEL_MMA845X_RESOLUTION;
1248 list[Accelerometer].power = ACCEL_MMA845X_POWER;
1252 list[Accelerometer].maxRange = ACCEL_MPU6050_RANGE;
1253 list[Accelerometer].resolution = ACCEL_MPU6050_RESOLUTION;
1254 list[Accelerometer].power = ACCEL_MPU6050_POWER;
1262 void MPLSensor::fillCompass(unsigned char compass, struct sensor_t *list)
1266 list[MagneticField].maxRange = COMPASS_AKM8975_RANGE;
1267 list[MagneticField].resolution = COMPASS_AKM8975_RESOLUTION;
1268 list[MagneticField].power = COMPASS_AKM8975_POWER;
1271 list[MagneticField].maxRange = COMPASS_AMI30X_RANGE;
1272 list[MagneticField].resolution = COMPASS_AMI30X_RESOLUTION;
1273 list[MagneticField].power = COMPASS_AMI30X_POWER;
1276 list[MagneticField].maxRange = COMPASS_AMI306_RANGE;
1277 list[MagneticField].resolution = COMPASS_AMI306_RESOLUTION;
1278 list[MagneticField].power = COMPASS_AMI306_POWER;
1281 list[MagneticField].maxRange = COMPASS_YAS529_RANGE;
1282 list[MagneticField].resolution = COMPASS_AMI306_RESOLUTION;
1283 list[MagneticField].power = COMPASS_AMI306_POWER;
1286 list[MagneticField].maxRange = COMPASS_YAS530_RANGE;
1287 list[MagneticField].resolution = COMPASS_YAS530_RESOLUTION;
1288 list[MagneticField].power = COMPASS_YAS530_POWER;
1291 list[MagneticField].maxRange = COMPASS_HMC5883_RANGE;
1292 list[MagneticField].resolution = COMPASS_HMC5883_RESOLUTION;
1293 list[MagneticField].power = COMPASS_HMC5883_POWER;
1296 list[MagneticField].maxRange = COMPASS_MMC314X_RANGE;
1297 list[MagneticField].resolution = COMPASS_MMC314X_RESOLUTION;
1298 list[MagneticField].power = COMPASS_MMC314X_POWER;
1301 list[MagneticField].maxRange = COMPASS_HSCDTD002B_RANGE;
1302 list[MagneticField].resolution = COMPASS_HSCDTD002B_RESOLUTION;
1303 list[MagneticField].power = COMPASS_HSCDTD002B_POWER;
1306 list[MagneticField].maxRange = COMPASS_HSCDTD004A_RANGE;
1307 list[MagneticField].resolution = COMPASS_HSCDTD004A_RESOLUTION;
1308 list[MagneticField].power = COMPASS_HSCDTD004A_POWER;
1315 void MPLSensor::fillGyro(const char* gyro, struct sensor_t *list)
1318 list[Gyro].maxRange = GYRO_MPU3050_RANGE;
1319 list[Gyro].resolution = GYRO_MPU3050_RESOLUTION;
1320 list[Gyro].power = GYRO_MPU3050_POWER;
1322 list[Gyro].maxRange = GYRO_MPU6050_RANGE;
1323 list[Gyro].resolution = GYRO_MPU6050_RESOLUTION;
1324 list[Gyro].power = GYRO_MPU6050_POWER;
1330 /* fillRV depends on values of accel and compass in the list */
1331 void MPLSensor::fillRV(struct sensor_t *list)
1334 list[RotationVector].power = list[Gyro].power + list[Accelerometer].power
1335 + list[MagneticField].power;
1336 list[RotationVector].resolution = .00001;
1337 list[RotationVector].maxRange = 1.0;
1341 void MPLSensor::fillOrientation(struct sensor_t *list)
1343 list[Orientation].power = list[Gyro].power + list[Accelerometer].power
1344 + list[MagneticField].power;
1345 list[Orientation].resolution = .00001;
1346 list[Orientation].maxRange = 360.0;
1350 void MPLSensor::fillGravity( struct sensor_t *list)
1352 list[Gravity].power = list[Gyro].power + list[Accelerometer].power
1353 + list[MagneticField].power;
1354 list[Gravity].resolution = .00001;
1355 list[Gravity].maxRange = 9.81;
1359 void MPLSensor::fillLinearAccel(struct sensor_t *list)
1361 list[Gravity].power = list[Gyro].power + list[Accelerometer].power
1362 + list[MagneticField].power;
1363 list[Gravity].resolution = list[Accelerometer].resolution;
1364 list[Gravity].maxRange = list[Accelerometer].maxRange;