Upload: add wait for serial scripts

This commit is contained in:
Daniel Fekete 2017-05-23 20:17:41 +02:00
parent e3d4218f11
commit c14d265e9b
4 changed files with 41 additions and 0 deletions

10
tools/linux/wait_for_serial Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
echo -n Waiting for $1 serial...
COUNTER=0
while [ ! -c $1 ] && ((COUNTER++ < 40)); do
sleep 0.1
done
echo Done

10
tools/linux64/wait_for_serial Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
echo -n Waiting for $1 serial...
COUNTER=0
while [ ! -c $1 ] && ((COUNTER++ < 40)); do
sleep 0.1
done
echo Done

10
tools/macosx/wait_for_serial Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
echo -n Waiting for $1 serial...
COUNTER=0
while [ ! -c $1 ] && ((COUNTER++ < 40)); do
sleep 0.1
done
echo Done

View File

@ -0,0 +1,11 @@
echo Waiting for %1 serial...
for /l %%x in (1, 1, 40) do (
ping -w 100 -n 1 127.0.0.1 > nul
mode %1 > nul
if ERRORLEVEL 0 goto comPortFound
)
echo timeout waiting for %1 serial
:comPortFound