autotrigger.sh 552 B

1234567891011121314151617181920212223242526
  1. #! /bin/bash
  2. function pci {
  3. APP_PATH=`dirname $0`/..
  4. if [ -d $APP_PATH/../pcitool ]; then
  5. PCILIB_BINARY="$APP_PATH/../pcitool/pcitool/pci"
  6. PCILIB_PATH="$APP_PATH/../pcitool/pcilib"
  7. else
  8. PCILIB_BINARY=`which pci`
  9. PCILIB_PATH=""
  10. fi
  11. LD_LIBRARY_PATH="$PCILIB_PATH" PCILIB_PLUGIN_DIR="$APP_PATH" $PCILIB_BINARY $*
  12. }
  13. echo "Starting the grabber"
  14. pci -g -o /dev/null --run-time 12000000 --verbose 10 &
  15. pid=$!
  16. sleep 0.1
  17. pci -w 9040 80004a01
  18. sleep 10
  19. pci -w 9040 80000201
  20. echo "Waiting grabber to finish"
  21. wait $pid