add shebangs, make pusher more robust

This commit is contained in:
Jeff Epler 2023-05-12 20:01:19 -05:00
parent 79c04e3093
commit 8af3cb72a0
No known key found for this signature in database
GPG key ID: D5BF15AB975AB4DE
3 changed files with 7 additions and 0 deletions

1
scripts/fastpush.py Normal file → Executable file
View file

@ -1,3 +1,4 @@
#!/usr/bin/python
# pipx foo.hex=inp:[beh]
import sys

1
scripts/lister.py Normal file → Executable file
View file

@ -1,3 +1,4 @@
#!/usr/bin/python
import os
import serial

5
scripts/pusher.py Normal file → Executable file
View 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)