Skip to content
Snippets Groups Projects
Commit 36c3061b authored by Carl Philipp Klemm's avatar Carl Philipp Klemm
Browse files

run_expirament.sh: use mcu watchdog, allow user initated restarting of the expirament

parent 05a912eb
Branches
Tags
No related merge requests found
......@@ -8,12 +8,28 @@ STOP=0
STEPFILE=/tmp/cchstep
RESTART=0
if [[ $# > 0 ]]; then
echo "Will load first step from $STEPFILE"
STEP=$(awk -F, '{ print $1 }' $STEPFILE)
if [ $? != 0 ]; then
echo "could not read last state from $STEPFILE"
STOP=1
break
fi
SUBSTEP=$(awk -F, '{ print $2 }' $STEPFILE)
if [ $? != 0 ]; then
echo "could not read last state from $STEPFILE"
STOP=1
break
fi
fi
while [[ $STOP == 0 && RESTART -lt 100 ]]; do
echo "Starting expirament at step $STEP substep $SUBSTEP"
rm $STEPFILE || true
coincellexpirament -l 10 -c "0,1,2,3,4,5,6,7" -o "$OUTDIR-$RESTART" -s $STEP -k $SUBSTEP -f $STEPFILE
coincellexpirament -w -l 10 -c "0,1,2,3,4,5,6,7" -o "$OUTDIR-$RESTART" -s $STEP -k $SUBSTEP -f $STEPFILE
RET=$?
RESTART=$((RESTART+1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment