mirror of
https://git.mirrors.martin98.com/https://github.com/petaflot/pygcode
synced 2025-08-13 23:45:54 +08:00
removed test code
This commit is contained in:
parent
d6e72df39f
commit
431ccb7dcf
@ -289,6 +289,10 @@ class AccordionWindow(object):
|
|||||||
def refresh(self):
|
def refresh(self):
|
||||||
self.window.refresh()
|
self.window.refresh()
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
self.lines = []
|
||||||
|
self.window.clear()
|
||||||
|
|
||||||
|
|
||||||
class AccordionWindowManager(object):
|
class AccordionWindowManager(object):
|
||||||
def __init__(self, screen, windows, header_height, footer_height=0):
|
def __init__(self, screen, windows, header_height, footer_height=0):
|
||||||
@ -720,7 +724,7 @@ group.add_argument(
|
|||||||
help="number of gcode lines to display ahead of them being sent",
|
help="number of gcode lines to display ahead of them being sent",
|
||||||
)
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
'--no-close', dest='no_close',
|
'--keep-open', '-o', dest='no_close',
|
||||||
action='store_const', const=True, default=False,
|
action='store_const', const=True, default=False,
|
||||||
help="if set, window won't close when job is done",
|
help="if set, window won't close when job is done",
|
||||||
)
|
)
|
||||||
@ -990,24 +994,6 @@ def curses_wrap(screen):
|
|||||||
{'[': 1, ',': 1, ']': -1, '.': -1}[k]
|
{'[': 1, ',': 1, ']': -1, '.': -1}[k]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Testing
|
|
||||||
elif k == 'a':
|
|
||||||
init.add_line(str(time.time()))
|
|
||||||
#accordion.update_distrobution()
|
|
||||||
elif k == 'A':
|
|
||||||
accordion.focus = init
|
|
||||||
elif k == 's':
|
|
||||||
jogging.add_line(str(time.time()))
|
|
||||||
#accordion.update_distrobution()
|
|
||||||
elif k == 'S':
|
|
||||||
accordion.focus = jogging
|
|
||||||
elif k == 'd':
|
|
||||||
stream.add_line(str(time.time()), sent=True, status='ok')
|
|
||||||
#accordion.update_distrobution()
|
|
||||||
elif k == 'D':
|
|
||||||
accordion.focus = stream
|
|
||||||
|
|
||||||
|
|
||||||
elif k == ' ':
|
elif k == ' ':
|
||||||
# Zero WPos coordinates
|
# Zero WPos coordinates
|
||||||
send_gcode(text2gcodes('G10 L20 P1 X0 Y0 Z0')[0], jogging)
|
send_gcode(text2gcodes('G10 L20 P1 X0 Y0 Z0')[0], jogging)
|
||||||
@ -1020,8 +1006,6 @@ def curses_wrap(screen):
|
|||||||
# dummy keypress on console window resize
|
# dummy keypress on console window resize
|
||||||
accordion.update_distrobution()
|
accordion.update_distrobution()
|
||||||
|
|
||||||
else:
|
|
||||||
status.set_status(k) # FIXME: remove
|
|
||||||
status.refresh()
|
status.refresh()
|
||||||
|
|
||||||
# spend 50ms processing received serial lines
|
# spend 50ms processing received serial lines
|
||||||
@ -1043,6 +1027,7 @@ def curses_wrap(screen):
|
|||||||
|
|
||||||
|
|
||||||
# ----------------- File Streaming -----------------
|
# ----------------- File Streaming -----------------
|
||||||
|
stream.clear()
|
||||||
accordion.focus = stream
|
accordion.focus = stream
|
||||||
|
|
||||||
def _check_resize():
|
def _check_resize():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user