diff options
Diffstat (limited to 'ROMFS/px4fmu_test')
-rw-r--r-- | ROMFS/px4fmu_test/init.d/rcS | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/ROMFS/px4fmu_test/init.d/rcS b/ROMFS/px4fmu_test/init.d/rcS index 3d1c4a907..1c66552f9 100644 --- a/ROMFS/px4fmu_test/init.d/rcS +++ b/ROMFS/px4fmu_test/init.d/rcS @@ -17,8 +17,8 @@ fi # # Try to mount the microSD card. # -echo "[i] looking for microSD..." -if mount -t vfat /dev/mmcsd0 /fs/microsd +mount -t vfat /dev/mmcsd0 /fs/microsd +if [ $? == 0 ] then echo "[i] card mounted at /fs/microsd" # Start playing the startup tune @@ -40,7 +40,8 @@ else set io_file /etc/extras/px4io-v1_default.bin fi -if px4io start +px4io start +if [ $? == 0 ] then echo "PX4IO OK" else @@ -48,7 +49,8 @@ else set unit_test_failure_list "${unit_test_failure_list} px4io_start" fi -if px4io checkcrc $io_file +px4io checkcrc $io_file +if [ $? == 0 ] then echo "PX4IO CRC OK" else @@ -87,45 +89,52 @@ fi # Add new unit tests using the same pattern as below. # -if mavlink_tests +mavlink_tests +if [ $? != 0 ] then -else set unit_test_failure 1 set unit_test_failure_list "${unit_test_failure_list} mavlink_tests" fi -if commander_tests +commander_tests +if [ $? != 0 ] then -else set unit_test_failure 1 set unit_test_failure_list "${unit_test_failure_list} commander_tests" fi -if uorb test +uorb test +if [ $? != 0 ] then -else set unit_test_failure 1 set unit_test_failure_list "${unit_test_failure_list} uorb_tests" fi -if hmc5883 -I start +adc start +hmc5883 -I -S start +if [ $? != 0 ] then - # This is an FMUv3 - echo "FMUv3" + # This is an FMUv1 or FMUv2 + echo "FMUv2 (or FMUv3 where 'hmc5883 -I -S start' failed)" ms5611 start + mpu6000 start + lsm303d start + l3gd20 start +else + # This is a FMUv3 + echo "FMUv3" mpu6000 -X start mpu6000 start lsm303d -X start l3gd20 -X start - echo "EVALUATION ONLY SENSORS (not used in production)" - ms5611 -X start -else - # This is an FMUv1 or FMUv2 - echo "FMUv2 (or FMUv3 where 'hmc5883 -I start' failed)" ms5611 start - mpu6000 start - lsm303d start - l3gd20 start +fi + +tests all +if [ $? != 0 ] +then + set unit_test_failure 1 + set unit_test_failure_list "${unit_test_failure_list} system_tests" fi if [ $unit_test_failure == 0 ] @@ -136,3 +145,5 @@ else echo echo "Some Unit Tests FAILED:${unit_test_failure_list}" fi + +ver all |