1
0
Fork 0

Modifications pour conserver les différentes sorties, si elles sont multiples

This commit is contained in:
trotFunky 2018-01-12 00:56:53 +01:00
parent 2df6441ec3
commit ff785ed8de

View file

@ -1,7 +1,12 @@
#! /bin/bash #! /bin/bash
trap "python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3 ; exit" INT function pythonGraph {
trap "python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3 ; exit" TERM python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py "$outFile" $1
exit
}
trap pythonGraph INT
trap pythonGraph TERM
stty -F /dev/ttyACM0 115200 raw -echo -echoe -echok stty -F /dev/ttyACM0 115200 raw -echo -echoe -echok
@ -11,16 +16,21 @@ else
fileName="./serialOutput/serialOutput.csv" fileName="./serialOutput/serialOutput.csv"
fi fi
rm -f $fileName if [ -e "$fileName" ]; then
touch $fileName fileName=".""$(echo $fileName | cut -f 2 -d".")""-$(date +'%Y-%m-%d @ %Hh%M').csv"
fi
touch "$fileName"
outFile=$(echo $fileName | cut -f 3 -d"/")
while true; do while true; do
read line < /dev/ttyACM0 read line < /dev/ttyACM0
echo $line >> $fileName echo $line >> "$fileName"
case "$line" in case "$line" in
*"DATAEND"*) *"DATAEND"*)
break;; break;;
esac esac
done done
python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3 python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py "$outFile" $1