From 8af3cb72a01c9231431c17fc8bf5c4315516c483 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 12 May 2023 20:01:19 -0500 Subject: [PATCH] add shebangs, make pusher more robust --- scripts/fastpush.py | 1 + scripts/lister.py | 1 + scripts/pusher.py | 5 +++++ 3 files changed, 7 insertions(+) mode change 100644 => 100755 scripts/fastpush.py mode change 100644 => 100755 scripts/lister.py mode change 100644 => 100755 scripts/pusher.py diff --git a/scripts/fastpush.py b/scripts/fastpush.py old mode 100644 new mode 100755 index d5e1bdd..e7f9762 --- a/scripts/fastpush.py +++ b/scripts/fastpush.py @@ -1,3 +1,4 @@ +#!/usr/bin/python # pipx foo.hex=inp:[beh] import sys diff --git a/scripts/lister.py b/scripts/lister.py old mode 100644 new mode 100755 index 71f3ff6..fb4cf90 --- a/scripts/lister.py +++ b/scripts/lister.py @@ -1,3 +1,4 @@ +#!/usr/bin/python import os import serial diff --git a/scripts/pusher.py b/scripts/pusher.py old mode 100644 new mode 100755 index 581ef28..c77aa3b --- a/scripts/pusher.py +++ b/scripts/pusher.py @@ -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)