1
0
Fork 0

Prise en comtpe de la fin de transmission

Proprification de la boucle infinie
This commit is contained in:
trotFunky 2018-01-11 16:25:23 +01:00
parent 606b4f5b19
commit 2df6441ec3

View file

@ -1,8 +1,7 @@
#! /bin/bash #! /bin/bash
trap "boucle=false ; 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" INT
trap "boucle=false ; python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3 ; exit" TERM trap "python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3 ; exit" TERM
boucle=true
stty -F /dev/ttyACM0 115200 raw -echo -echoe -echok stty -F /dev/ttyACM0 115200 raw -echo -echoe -echok
@ -15,7 +14,13 @@ fi
rm -f $fileName rm -f $fileName
touch $fileName touch $fileName
while $boucle; do while true; do
read line < /dev/ttyACM0 read line < /dev/ttyACM0
echo $line >> $fileName echo $line >> $fileName
case "$line" in
*"DATAEND"*)
break;;
esac
done done
python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3