AP_InertialSensor: change for new PX4 device paths

This commit is contained in:
Andrew Tridgell 2015-02-13 19:21:13 +11:00
parent 99ed508903
commit 4537acb898
1 changed files with 6 additions and 6 deletions

View File

@ -43,12 +43,12 @@ AP_InertialSensor_Backend *AP_InertialSensor_PX4::detect(AP_InertialSensor &_imu
bool AP_InertialSensor_PX4::_init_sensor(void)
{
// assumes max 3 instances
_accel_fd[0] = open(ACCEL_DEVICE_PATH, O_RDONLY);
_accel_fd[1] = open(ACCEL_DEVICE_PATH "1", O_RDONLY);
_accel_fd[2] = open(ACCEL_DEVICE_PATH "2", O_RDONLY);
_gyro_fd[0] = open(GYRO_DEVICE_PATH, O_RDONLY);
_gyro_fd[1] = open(GYRO_DEVICE_PATH "1", O_RDONLY);
_gyro_fd[2] = open(GYRO_DEVICE_PATH "2", O_RDONLY);
_accel_fd[0] = open(ACCEL_BASE_DEVICE_PATH "0", O_RDONLY);
_accel_fd[1] = open(ACCEL_BASE_DEVICE_PATH "1", O_RDONLY);
_accel_fd[2] = open(ACCEL_BASE_DEVICE_PATH "2", O_RDONLY);
_gyro_fd[0] = open(GYRO_BASE_DEVICE_PATH "0", O_RDONLY);
_gyro_fd[1] = open(GYRO_BASE_DEVICE_PATH "1", O_RDONLY);
_gyro_fd[2] = open(GYRO_BASE_DEVICE_PATH "2", O_RDONLY);
_num_accel_instances = 0;
_num_gyro_instances = 0;