Prise en comtpe de la fin de transmission
Proprification de la boucle infinie
This commit is contained in:
parent
606b4f5b19
commit
2df6441ec3
1 changed files with 10 additions and 5 deletions
|
@ -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
|
||||||
done
|
case "$line" in
|
||||||
|
*"DATAEND"*)
|
||||||
|
break;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py $1 $2 $3
|
Loading…
Add table
Reference in a new issue