X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-bringup%2Fturnon_telemetrum;h=bb455c988d6bd8991e61734435ba5bba2f35f08f;hp=588c7f317e6c01568d330266834c3f1c12705bd0;hb=HEAD;hpb=4828be0ca5252ac9cd6061209385dcd6c4c57965 diff --git a/ao-bringup/turnon_telemetrum b/ao-bringup/turnon_telemetrum index 588c7f31..bb455c98 100755 --- a/ao-bringup/turnon_telemetrum +++ b/ao-bringup/turnon_telemetrum @@ -1,9 +1,9 @@ #!/bin/sh -if [ -x /usr/bin/ao-flash-stm ]; then - FLASH_STM=/usr/bin/ao-flash-stm +if [ -x /usr/bin/ao-flash-samd21 ]; then + FLASH_STM=/usr/bin/ao-flash-samd21 else - echo "Can't find ao-flash-stm! Aborting." + echo "Can't find ao-flash-samd21! Aborting." exit 1 fi @@ -14,26 +14,41 @@ else exit 1 fi -VERSION=2.0 +VERSION=4.0 +PRODUCT=TeleMetrum -echo "TeleMetrum v$VERSION Turn-On and Calibration Program" -echo "Copyright 2014 by Bdale Garbee. Released under GPL v2" +echo "$PRODUCT v$VERSION Turn-On and Calibration Program" +echo "Copyright 2023 by Bdale Garbee. Released under GPL v2" echo echo "Expectations:" -echo "\tTeleMetrum v$VERSIOn powered from USB" +echo "\t$PRODUCT v$VERSION powered from USB" echo "\t\twith ST-Link-V2 cabled to debug header" echo "\t\twith coax from UHF to frequency counter" echo -echo -n "TeleMetrum-$VERSION serial number: " -read SERIAL +echo -n "$PRODUCT-$VERSION serial number: " + +case $# in + 1) + SERIAL="$1" + echo "$PRODUCT-$VERSION serial number: $SERIAL" + ;; + 0) + echo -n "$PRODUCT-$VERSION serial number: " + read SERIAL + ;; + *) + echo "Usage: $0 " 1>&2 + exit 1; + ;; +esac echo $FLASH_STM $FLASH_STM ~/altusmetrumllc/Binaries/loaders/telemetrum-v$VERSION-*.elf || exit 1 -sleep 2 +sleep 3 -$USBLOAD --serial=$SERIAL /usr/share/altos/telemetrum-v$VERSION*.ihx || exit 1 +$USBLOAD --serial=$SERIAL ~/altusmetrumllc/Binaries/telemetrum-v$VERSION-*.elf || exit 1 sleep 5 @@ -53,4 +68,14 @@ echo 'E 0' > $dev SERIAL=$SERIAL ./cal-freq $dev -./cal-accel $dev +failed=1 +while [ $failed = 1 ]; do + ../ao-tools/ao-cal-accel/ao-cal-accel $dev + failed=$? +done + +echo 'E 1' > $dev + +./test-telemetrum-v4.0 + +exit $?