From d5e72a5440d0e02bf329cad304895c69a6429b85 Mon Sep 17 00:00:00 2001 From: Gone4Dirt Date: Sat, 10 Jun 2023 04:32:31 +0100 Subject: [PATCH] AP_Motors: Fix up MotorTestSweep.sh now that frame_class is an enforced argument --- .../examples/AP_Motors_test/MotorTestSweep.sh | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/libraries/AP_Motors/examples/AP_Motors_test/MotorTestSweep.sh b/libraries/AP_Motors/examples/AP_Motors_test/MotorTestSweep.sh index 767e018153..a2f68b435f 100755 --- a/libraries/AP_Motors/examples/AP_Motors_test/MotorTestSweep.sh +++ b/libraries/AP_Motors/examples/AP_Motors_test/MotorTestSweep.sh @@ -13,17 +13,23 @@ echo YAW_HEADROOM="0 100 200 300 400 500 600 700 800 900 1000" THR_AVERAGE_MAX="0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0" +# Change this to change the frame classes to test. Testing all takes a while. +FRAME_CLASS="1 2 3 6 11 13" + COUNTER=0 -for headroom in $YAW_HEADROOM; do - echo "Yaw Headroom: $headroom" - for Thr in $THR_AVERAGE_MAX; do - echo " Throttle average max: $Thr" - # Test with and without boost - ./build/linux/examples/AP_Motors_test s yaw_headroom=$headroom throttle_avg_max=$Thr thrust_boost=0 > MotorTestSweep/$COUNTER.csv - let COUNTER++ - ./build/linux/examples/AP_Motors_test s yaw_headroom=$headroom throttle_avg_max=$Thr thrust_boost=1 > MotorTestSweep/$COUNTER.csv - let COUNTER++ +for frame_class in $FRAME_CLASS; do + echo "Frame Class: $frame_class" + for headroom in $YAW_HEADROOM; do + echo "Yaw Headroom: $headroom" + for Thr in $THR_AVERAGE_MAX; do + echo " Throttle average max: $Thr" + # Test with and without boost + ./build/linux/examples/AP_Motors_test s frame_class=$frame_class yaw_headroom=$headroom throttle_avg_max=$Thr thrust_boost=0 > MotorTestSweep/$COUNTER.csv + let COUNTER++ + ./build/linux/examples/AP_Motors_test s frame_class=$frame_class yaw_headroom=$headroom throttle_avg_max=$Thr thrust_boost=1 > MotorTestSweep/$COUNTER.csv + let COUNTER++ + done + echo done - echo done