mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-02-11 07:03:07 +01:00
add some testing tools
This commit is contained in:
19
tools/sendDelay.py
Executable file
19
tools/sendDelay.py
Executable file
@@ -0,0 +1,19 @@
|
||||
#! /usr/bin/env python3
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
|
||||
def usage():
|
||||
print(f"usage: {sys.argv[0]} file delay")
|
||||
sys.exit(1)
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
usage()
|
||||
|
||||
delay=float(sys.argv[2])
|
||||
fn=sys.argv[1]
|
||||
with open (fn,"r") as fh:
|
||||
for line in fh:
|
||||
print(line,end="",flush=True)
|
||||
time.sleep(delay)
|
||||
|
||||
Reference in New Issue
Block a user