Commit 523a2a4f authored by Kliment Yanev's avatar Kliment Yanev

Merge branch 'experimental' of https://github.com/jezmy/Printrun into experimental

parents 8237b634 8bdb86f6
......@@ -1116,7 +1116,7 @@ class pronsole(cmd.Cmd):
if(self.sdprinting):
self.p.send_now("M27")
time.sleep(interval)
print (self.tempreadings.replace("\r","").replace("T","Hotend").replace("B","Bed").replace("\n","").replace("ok ",""))
#print (self.tempreadings.replace("\r","").replace("T","Hotend").replace("B","Bed").replace("\n","").replace("ok ",""))
if(self.p.printing):
print "Print progress: ", 100*float(self.p.queueindex)/len(self.p.mainqueue), "%"
......
......@@ -39,6 +39,8 @@ StringIO=cStringIO
thread=threading.Thread
winsize=(800,500)
layerindex=0
global buttonSize
buttonSize = (70, 25) # Define sizes for the buttons on top rows
if os.name=="nt":
winsize=(800,530)
try:
......@@ -498,30 +500,30 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#lower section contains the rest of the window - manual controls, console, visualizations
#TOP ROW:
uts=self.uppertopsizer=wx.BoxSizer(wx.HORIZONTAL)
self.rescanbtn=wx.Button(self.panel,-1,_("Port"),style=wx.BU_EXACTFIT)
self.rescanbtn=wx.Button(self.panel,-1,_("Port"),size=(70, 25))
self.rescanbtn.Bind(wx.EVT_BUTTON,self.rescanports)
uts.Add(self.rescanbtn,0,wx.TOP|wx.LEFT,0)
self.serialport = wx.ComboBox(self.panel, -1,
choices=self.scanserial(),
style=wx.CB_DROPDOWN)
style=wx.CB_DROPDOWN, size=(100, 25))
self.rescanports()
uts.Add(self.serialport)
uts.Add(wx.StaticText(self.panel,-1,"@"),0,wx.RIGHT|wx.ALIGN_CENTER,0)
self.baud = wx.ComboBox(self.panel, -1,
choices=["2400", "9600", "19200", "38400", "57600", "115200", "250000"],
style=wx.CB_DROPDOWN)
style=wx.CB_DROPDOWN, size=(100, 25))
try:
self.baud.SetValue("115200")
self.baud.SetValue(str(self.settings.baudrate))
except:
pass
uts.Add(self.baud)
self.connectbtn=wx.Button(self.panel,-1,_("Connect"),style=wx.BU_EXACTFIT)
self.connectbtn=wx.Button(self.panel,-1,_("Connect"), size=buttonSize)
uts.Add(self.connectbtn)
self.connectbtn.SetToolTipString(_("Connect to the printer"))
self.connectbtn.Bind(wx.EVT_BUTTON,self.connect)
self.resetbtn=wx.Button(self.panel,-1,_("Reset"),style=wx.BU_EXACTFIT)
self.resetbtn=wx.Button(self.panel,-1,_("Reset"), size=buttonSize)
self.resetbtn.Bind(wx.EVT_BUTTON,self.reset)
uts.Add(self.resetbtn)
#self.minibtn=wx.Button(self.panel,-1,_("Mini mode"),style=wx.BU_EXACTFIT)
......@@ -535,23 +537,21 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#SECOND ROW
ubs=self.upperbottomsizer=uts#wx.BoxSizer(wx.HORIZONTAL)
self.loadbtn=wx.Button(self.panel,-1,_("Load file"),style=wx.BU_EXACTFIT)
self.loadbtn=wx.Button(self.panel,-1,_("Load file"), size=buttonSize)
self.loadbtn.Bind(wx.EVT_BUTTON,self.loadfile)
ubs.Add(self.loadbtn)
self.platebtn=wx.Button(self.panel,-1,_("Compose"),style=wx.BU_EXACTFIT)
self.platebtn=wx.Button(self.panel,-1,_("Compose"), size=buttonSize)
self.platebtn.Bind(wx.EVT_BUTTON,self.plate)
#self.printerControls.append(self.uploadbtn)
ubs.Add(self.platebtn)
self.sdbtn=wx.Button(self.panel,-1,_("SD"),style=wx.BU_EXACTFIT)
self.sdbtn=wx.Button(self.panel,-1,_("SD"), size=buttonSize)
self.sdbtn.Bind(wx.EVT_BUTTON,self.sdmenu)
self.printerControls.append(self.sdbtn)
ubs.Add(self.sdbtn)
self.printbtn=wx.Button(self.panel,-1,_("Print"),style=wx.BU_EXACTFIT)
self.printbtn.Bind(wx.EVT_BUTTON,self.printfile)
self.printbtn=wx.Button(self.panel,-1,_("Print"), size=buttonSize)
self.printbtn.Disable()
ubs.Add(self.printbtn)
self.pausebtn=wx.Button(self.panel,-1,_("Pause"),style=wx.BU_EXACTFIT)
self.pausebtn.Bind(wx.EVT_BUTTON,self.pause)
self.pausebtn=wx.Button(self.panel,-1,_("Pause"), size=buttonSize)
ubs.Add(self.pausebtn)
#Right full view
lrs=self.lowerrsizer=wx.BoxSizer(wx.VERTICAL)
......@@ -1298,9 +1298,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
pass
tstring=l.rstrip()
#print tstring
if (tstring!="ok" and tstring!="wait"):
print "[" + time.strftime('%H:%M:%S',time.localtime(time.time())) + "] " + tstring
#wx.CallAfter(self.logbox.AppendText,tstring+"\n")
if (tstring!="ok") and (tstring!="wait") and ("ok T:" not in tstring):
# print "*"+tstring+"*"
# print "[" + time.strftime('%H:%M:%S',time.localtime(time.time())) + "] " + tstring
wx.CallAfter(self.logbox.AppendText,tstring+"\n")
for i in self.recvlisteners:
i(l)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment