Modifications pour conserver les différentes sorties, si elles sont multiples
This commit is contained in:
parent
2df6441ec3
commit
ff785ed8de
1 changed files with 16 additions and 6 deletions
|
@ -1,7 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
trap "python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3 ; exit" INT
|
||||
trap "python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3 ; exit" TERM
|
||||
function pythonGraph {
|
||||
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
|
||||
|
||||
|
@ -11,16 +16,21 @@ else
|
|||
fileName="./serialOutput/serialOutput.csv"
|
||||
fi
|
||||
|
||||
rm -f $fileName
|
||||
touch $fileName
|
||||
if [ -e "$fileName" ]; then
|
||||
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
|
||||
read line < /dev/ttyACM0
|
||||
echo $line >> $fileName
|
||||
echo $line >> "$fileName"
|
||||
case "$line" in
|
||||
*"DATAEND"*)
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3
|
||||
python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py "$outFile" $1
|
Loading…
Add table
Reference in a new issue