add shebangs, make pusher more robust
This commit is contained in:
parent
79c04e3093
commit
8af3cb72a0
3 changed files with 7 additions and 0 deletions
1
scripts/fastpush.py
Normal file → Executable file
1
scripts/fastpush.py
Normal file → Executable file
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
# pipx foo.hex=inp:[beh]
|
||||
|
||||
import sys
|
||||
|
|
|
|||
1
scripts/lister.py
Normal file → Executable file
1
scripts/lister.py
Normal file → Executable file
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
import serial
|
||||
|
||||
|
|
|
|||
5
scripts/pusher.py
Normal file → Executable file
5
scripts/pusher.py
Normal file → Executable file
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
# pipx foo.hex=inp:[beh]
|
||||
|
||||
import sys
|
||||
|
|
@ -17,11 +18,15 @@ try:
|
|||
sent += len(line)
|
||||
if sent > buffer_size:
|
||||
s.flush()
|
||||
time.sleep(1/30)
|
||||
s.write(b'\x13\r\n')
|
||||
time.sleep(1/30)
|
||||
s.flush()
|
||||
time.sleep(wait_time)
|
||||
sent = len(line)
|
||||
s.write(line)
|
||||
s.flush()
|
||||
time.sleep(1/30)
|
||||
finally:
|
||||
s.write(b'\x13')
|
||||
time.sleep(wait_time)
|
||||
|
|
|
|||
Loading…
Reference in a new issue