Skip to content

Commit

Permalink
Optimize rc shell
Browse files Browse the repository at this point in the history
  • Loading branch information
flynxea authored and LorenzMeier committed Mar 30, 2016
1 parent 4aa13d8 commit c528c02
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 62 deletions.
115 changes: 59 additions & 56 deletions ROMFS/px4fmu_common/init.d/rc.sensors
Original file line number Diff line number Diff line change
Expand Up @@ -83,78 +83,81 @@ then
then
fi
fi
else
if ver hwcmp PX4FMU_V4
fi

if ver hwcmp PX4FMU_V4
then
# External I2C bus
if hmc5883 -C -T -X start
then
# External I2C bus
if hmc5883 -C -T -X start
then
fi
fi

# Internal SPI bus is rotated 90 deg yaw
if hmc5883 -C -T -S -R 2 start
then
fi
# Internal SPI bus is rotated 90 deg yaw
if hmc5883 -C -T -S -R 2 start
then
fi

# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20608 start
then
fi
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20608 start
then
fi

# Internal SPI bus mpu9250 is rotated 90 deg yaw
if mpu9250 -R 2 start
then
fi
fi

if ver hwcmp PX4FMU_V1
then
# FMUv1
if mpu6000 start
then
fi

if l3gd20 start
then
fi

# Internal SPI bus mpu9250 is rotated 90 deg yaw
if mpu9250 -R 2 start
# MAG selection
if param compare SENS_EXT_MAG 2
then
if hmc5883 -C -I start
then
fi
else
if ver hwcmp MINDPX_V2
# Use only external as primary
if param compare SENS_EXT_MAG 1
then
if mpu6500 start
if hmc5883 -C -X start
then
fi

if lsm303d start
else
# auto-detect the primary, prefer external
if hmc5883 start
then
fi
fi
fi
fi

if l3gd20 start
then
fi
if ver hwcmp MINDPX_V2
then
if mpu6500 start
then
fi

# External I2C bus
if hmc5883 -C -T -X start
then
fi
else
# FMUv1
if mpu6000 start
then
fi
if lsm303d start
then
fi

if l3gd20 start
then
fi
if l3gd20 start
then
fi

# MAG selection
if param compare SENS_EXT_MAG 2
then
if hmc5883 -C -I start
then
fi
else
# Use only external as primary
if param compare SENS_EXT_MAG 1
then
if hmc5883 -C -X start
then
fi
else
# auto-detect the primary, prefer external
if hmc5883 start
then
fi
fi
fi
fi
# External I2C bus
if hmc5883 -C -T -X start
then
fi
fi

Expand Down
6 changes: 0 additions & 6 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -815,12 +815,6 @@ fi
# XXX potentially unset all script variables.
unset TUNE_ERR

#if ver hwcmp MINDPX_V2
#then
# start sonnar
# hc_sr04 start
#fi

# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
mavlink boot_complete

Expand Down

0 comments on commit c528c02

Please sign in to comment.