Commit faa01969 authored by Keegi's avatar Keegi

Save pronterface changes into settings, fix not taking feedrate spinners into account

parent 6ed74e6a
...@@ -213,7 +213,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -213,7 +213,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
try: try:
self.serialport.SetValue(scan[0]) self.serialport.SetValue(scan[0])
if self.settings.port: if self.settings.port:
self.serialport.SetValue(self.settings.port) self.serialport.SetValue(self.settings.port)
except: except:
pass pass
uts.Add(self.serialport) uts.Add(self.serialport)
...@@ -396,15 +396,15 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -396,15 +396,15 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def setfeeds(self,e): def setfeeds(self,e):
try: try:
self.feede=int(self.efeedc.GetValue()) self.settings._set("e_feedrate",self.efeedc.GetValue())
except: except:
pass pass
try: try:
self.feedz=int(self.zfeedc.GetValue()) self.settings._set("z_feedrate",self.zfeedc.GetValue())
except: except:
pass pass
try: try:
self.feedxy=int(self.xyfeedc.GetValue()) self.settings._set("xy_feedrate",self.xyfeedc.GetValue())
except: except:
pass pass
...@@ -436,6 +436,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -436,6 +436,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.statuscheck=0 self.statuscheck=0
self.p.recvcb=None self.p.recvcb=None
self.p.disconnect() self.p.disconnect()
self.save_in_rc("set xy_feedrate","set xy_feedrate %d" % self.settings.xy_feedrate)
self.save_in_rc("set z_feedrate","set z_feedrate %d" % self.settings.z_feedrate)
self.save_in_rc("set e_feedrate","set e_feedrate %d" % self.settings.e_feedrate)
try: try:
self.gwindow.Destroy() self.gwindow.Destroy()
except: except:
...@@ -734,6 +737,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -734,6 +737,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.p.send_now("M26 S0") self.p.send_now("M26 S0")
self.p.connect(port,baud) self.p.connect(port,baud)
self.statuscheck=True self.statuscheck=True
if port != self.settings.port:
self.set("port",port)
if baud != self.settings.baudrate:
self.set("baudrate",str(baud))
threading.Thread(target=self.statuschecker).start() threading.Thread(target=self.statuschecker).start()
......
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