Fixed [[ bug and more cleaning.
This commit is contained in:
20
CS_scan.sh
20
CS_scan.sh
@ -31,7 +31,7 @@ sls_detector_put configuremac 0
|
|||||||
echo "The receiver should be waiting for data"
|
echo "The receiver should be waiting for data"
|
||||||
echo "Please check and press any key to continue, or press q to exit this script"
|
echo "Please check and press any key to continue, or press q to exit this script"
|
||||||
read -n 1 -s input
|
read -n 1 -s input
|
||||||
if [ $input = "q" ]; then
|
if [[ $input = "q" ]]; then
|
||||||
echo "Exiting script"
|
echo "Exiting script"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -71,8 +71,6 @@ do
|
|||||||
tint_sec=$(printf %.9f $(echo "$tint/1000000000" | bc -l))
|
tint_sec=$(printf %.9f $(echo "$tint/1000000000" | bc -l))
|
||||||
echo "setting integration time to (s) " $tint_sec
|
echo "setting integration time to (s) " $tint_sec
|
||||||
sls_detector_put exptime $tint_sec
|
sls_detector_put exptime $tint_sec
|
||||||
sls_detector_get reg 0x68 # what is this doing?
|
|
||||||
#sleep 1
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
@ -84,8 +82,6 @@ do
|
|||||||
tint_sec=$(printf %.8f $(echo "$tint/100000000" | bc -l))
|
tint_sec=$(printf %.8f $(echo "$tint/100000000" | bc -l))
|
||||||
echo "setting integration time to (s) " $tint_sec
|
echo "setting integration time to (s) " $tint_sec
|
||||||
sls_detector_put exptime $tint_sec
|
sls_detector_put exptime $tint_sec
|
||||||
sls_detector_get reg 0x68
|
|
||||||
#sleep 1
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
@ -97,8 +93,6 @@ do
|
|||||||
tint_sec=$(printf %.8f $(echo "$tint/100000000" | bc -l))
|
tint_sec=$(printf %.8f $(echo "$tint/100000000" | bc -l))
|
||||||
echo "setting integration time to (s) " $tint_sec
|
echo "setting integration time to (s) " $tint_sec
|
||||||
sls_detector_put exptime $tint_sec
|
sls_detector_put exptime $tint_sec
|
||||||
sls_detector_get reg 0x68
|
|
||||||
#sleep 1
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
@ -110,8 +104,6 @@ do
|
|||||||
tint_sec=$(printf %.8f $(echo "$tint/100000000" | bc -l))
|
tint_sec=$(printf %.8f $(echo "$tint/100000000" | bc -l))
|
||||||
echo "setting integration time to (s) " $tint_sec
|
echo "setting integration time to (s) " $tint_sec
|
||||||
sls_detector_put exptime $tint_sec
|
sls_detector_put exptime $tint_sec
|
||||||
sls_detector_get reg 0x68
|
|
||||||
#sleep 1
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
@ -123,8 +115,6 @@ do
|
|||||||
tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l))
|
tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l))
|
||||||
echo "setting integration time to (s) " $tint_sec
|
echo "setting integration time to (s) " $tint_sec
|
||||||
sls_detector_put exptime $tint_sec
|
sls_detector_put exptime $tint_sec
|
||||||
sls_detector_get reg 0x68
|
|
||||||
#sleep 1
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
@ -136,8 +126,6 @@ do
|
|||||||
tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l))
|
tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l))
|
||||||
echo "setting integration time to (s) " $tint_sec
|
echo "setting integration time to (s) " $tint_sec
|
||||||
sls_detector_put exptime $tint_sec
|
sls_detector_put exptime $tint_sec
|
||||||
sls_detector_get reg 0x68
|
|
||||||
#sleep 1
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
@ -149,8 +137,6 @@ do
|
|||||||
tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l))
|
tint_sec=$(printf %.7f $(echo "$tint/10000000" | bc -l))
|
||||||
echo "setting integration time to (s) " $tint_sec
|
echo "setting integration time to (s) " $tint_sec
|
||||||
sls_detector_put exptime $tint_sec
|
sls_detector_put exptime $tint_sec
|
||||||
sls_detector_get reg 0x68
|
|
||||||
#sleep 1
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
@ -162,8 +148,6 @@ do
|
|||||||
tint_sec=$(printf %.7f $(echo "$tint/1000000" | bc -l))
|
tint_sec=$(printf %.7f $(echo "$tint/1000000" | bc -l))
|
||||||
echo "setting integration time to (s) " $tint_sec
|
echo "setting integration time to (s) " $tint_sec
|
||||||
sls_detector_put exptime $tint_sec
|
sls_detector_put exptime $tint_sec
|
||||||
sls_detector_get reg 0x68
|
|
||||||
#sleep 1
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
@ -175,8 +159,6 @@ do
|
|||||||
tint_sec=$(printf %.7f $(echo "$tint/1000000" | bc -l))
|
tint_sec=$(printf %.7f $(echo "$tint/1000000" | bc -l))
|
||||||
echo "setting integration time to (s) " $tint_sec
|
echo "setting integration time to (s) " $tint_sec
|
||||||
sls_detector_put exptime $tint_sec
|
sls_detector_put exptime $tint_sec
|
||||||
sls_detector_get reg 0x68
|
|
||||||
#sleep 1
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user