Skip to content

Commit

Permalink
nc_files: add a python based 'filter program' test program
Browse files Browse the repository at this point in the history
for basic testing of screens that do filtering.
This python version covers us if qt5 is not available.
  • Loading branch information
c-morley committed Nov 15, 2020
1 parent f92aeec commit 8d06ff3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions nc_files/filtertest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import time
import sys

for i in range(0,100):
try:
# simulate calculation time
time.sleep(.1)

# output a line of gcode
print >>sys.stdout, 'G0 X1'

# update progress
print >>sys.stderr, 'FILTER_PROGRESS={}'.format(i)
except:
# This causes an error message
print >>sys.stderr, 'Error; But this was only a test'
raise SystemExit(1)




0 comments on commit 8d06ff3

Please sign in to comment.