def setUp(self):
     self.s = MockSerial()
     self.drv = drvFabGrbl(device=self.s)
Exemplo n.º 2
0
import gcode
import keyhandler
import frameGcode
import inputTkCoord

def NextMove():
	c.NextMove()
	root.after(100,NextMove)
	
if __name__=='__main__':
	root=tk.Tk()
	menu=tk.Menu(root)
	root.config(menu=menu)
	inTkc=inputTkCoord.inputTkCoord(root)
	out1=visualTk.vTk(root,xSize=SIZE1,ySize=SIZE2,posVars=inTkc.coord)
	out2=outputGcode.outGcode(driver=drvFabGrbl('/dev/ttyUSB0'))
	out3=visualStream.vStream(sys.stdout)
	c=cutter.Cutter(output=[out1,out2,out3])
	mc=MenuCutter(pMenu=menu,Cutter=c)
	gb=frameGcode.FrameGcode(root,pMenu=menu,cutter=c)
	gb.pack(side=tk.LEFT,fill=tk.BOTH,expand=True)
	inTkc.pack(side=tk.TOP)
	out1.pack(side=tk.TOP)
	inKMove=keyhandler.KeyboardMove(root)
	inKMisc=keyhandler.KeyboardMisc(root)
	keyhandler.KeyboardBasic(root)
	c.input=inRoundRobin([inKMove,inKMisc,out1,inTkc])
	root.after(100,NextMove)
	root.mainloop()

Exemplo n.º 3
0
import keyhandler
import frameGcode
import inputTkCoord


def NextMove():
    c.NextMove()
    root.after(100, NextMove)


if __name__ == '__main__':
    root = tk.Tk()
    menu = tk.Menu(root)
    root.config(menu=menu)
    inTkc = inputTkCoord.inputTkCoord(root)
    out1 = visualTk.vTk(root, xSize=SIZE1, ySize=SIZE2, posVars=inTkc.coord)
    out2 = outputGcode.outGcode(driver=drvFabGrbl('/dev/ttyUSB0'))
    out3 = visualStream.vStream(sys.stdout)
    c = cutter.Cutter(output=[out1, out2, out3])
    mc = MenuCutter(pMenu=menu, Cutter=c)
    gb = frameGcode.FrameGcode(root, pMenu=menu, cutter=c)
    gb.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
    inTkc.pack(side=tk.TOP)
    out1.pack(side=tk.TOP)
    inKMove = keyhandler.KeyboardMove(root)
    inKMisc = keyhandler.KeyboardMisc(root)
    keyhandler.KeyboardBasic(root)
    c.input = inRoundRobin([inKMove, inKMisc, out1, inTkc])
    root.after(100, NextMove)
    root.mainloop()
	def setUp(self):
		self.s=MockSerial()
		self.drv=drvFabGrbl(device=self.s)