Commit 930583a1 authored by Christopher Keller's avatar Christopher Keller

Added Tooltips and a Help Dictionary for the User Options.

parent 3e06eb74
...@@ -171,16 +171,16 @@ class Settings: ...@@ -171,16 +171,16 @@ class Settings:
# the initial value determines the type # the initial value determines the type
self.port = "" self.port = ""
self.baudrate = 115200 self.baudrate = 115200
self.temperature_pla = 185
self.temperature_abs = 230
self.bedtemp_pla = 60
self.bedtemp_abs = 110 self.bedtemp_abs = 110
self.bedtemp_pla = 60
self.temperature_abs = 230
self.temperature_pla = 185
self.xy_feedrate = 3000 self.xy_feedrate = 3000
self.z_feedrate = 200 self.z_feedrate = 200
self.e_feedrate = 300 self.e_feedrate = 300
self.slicecommand="python skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py $s" self.slicecommand="python skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py $s"
self.sliceoptscommand="python skeinforge/skeinforge_application/skeinforge.py" self.sliceoptscommand="python skeinforge/skeinforge_application/skeinforge.py"
def _set(self,key,value): def _set(self,key,value):
try: try:
value = getattr(self,"_%s_alias"%key)()[value] value = getattr(self,"_%s_alias"%key)()[value]
...@@ -241,6 +241,19 @@ class pronsole(cmd.Cmd): ...@@ -241,6 +241,19 @@ class pronsole(cmd.Cmd):
self.settings._bedtemp_abs_cb = self.set_temp_preset self.settings._bedtemp_abs_cb = self.set_temp_preset
self.settings._bedtemp_pla_cb = self.set_temp_preset self.settings._bedtemp_pla_cb = self.set_temp_preset
self.monitoring=0 self.monitoring=0
self.helpdict = {}
self.helpdict["baudrate"] = _("Communications Speed (default: 115200)")
self.helpdict["bedtemp_abs"] = _("Heated Build Platform temp for ABS (default: 110 deg C)")
self.helpdict["bedtemp_pla"] = _("Heated Build Platform temp for PLA (default: 60 deg C)")
self.helpdict["e_feedrate"] = _("Feedrate for Control Panel Moves in Extrusions (default: 300mm/min)")
self.helpdict["port"] = _("Port used to communicate with printer")
self.helpdict["slicecommand"] = _("Feedrate for Control Panel Moves in Extrusions.\n default:\n python skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py $s)")
self.helpdict["sliceoptscommand"] = _("Feedrate for Control Panel Moves in Extrusions.\n default:\n python skeinforge/skeinforge_application/skeinforge.py")
self.helpdict["temperature_abs"] = _("Extruder temp for ABS (default: 230 deg C)")
self.helpdict["temperature_pla"] = _("Extruder temp for PLA (default: 185 deg C)")
self.helpdict["xy_feedrate"] = _("Feedrate for Control Panel Moves in X and Y (default: 3000mm/min)")
self.helpdict["z_feedrate"] = _("Feedrate for Control Panel Moves in Z (default: 200mm/min)")
def set_temp_preset(self,key,value): def set_temp_preset(self,key,value):
if not key.startswith("bed"): if not key.startswith("bed"):
......
...@@ -55,14 +55,20 @@ class Tee(object): ...@@ -55,14 +55,20 @@ class Tee(object):
class PronterWindow(wx.Frame,pronsole.pronsole): class PronterWindow(wx.Frame,pronsole.pronsole):
def __init__(self, filename=None,size=winsize): def __init__(self, filename=None,size=winsize):
pronsole.pronsole.__init__(self) pronsole.pronsole.__init__(self)
self.settings.build_dimensions = '200x200x100+0+0+0' #default build dimensions are 200x200x100 with 0,0,0 in the corner of the bed
self.settings.last_bed_temperature = 0.0
self.settings.last_file_path = "" self.settings.last_file_path = ""
self.settings.last_temperature = 0.0 self.settings.last_temperature = 0.0
self.settings.last_bed_temperature = 0.0 self.settings.preview_extrusion_width = 0.5
#default build dimensions are 200x200x100 with 0,0,0 in the corner of the bed
self.settings.build_dimensions = '200x200x100+0+0+0'
self.settings.preview_grid_step1 = 10. self.settings.preview_grid_step1 = 10.
self.settings.preview_grid_step2 = 50. self.settings.preview_grid_step2 = 50.
self.settings.preview_extrusion_width = 0.5 self.helpdict["build_dimensions"] = _("Dimensions of Build Platform\n & optional offset of origin\n\nExamples:\n XXXxYYY\n XXX,YYY,ZZZ\n XXXxYYYxZZZ+OffX+OffY+OffZ")
self.helpdict["last_bed_temperature"] = _("Last Set Temperature for the Heated Print Bed")
self.helpdict["last_file_path"] = _("Folder of last opened file")
self.helpdict["last_temperature"] = _("Last Temperature of the Hot End")
self.helpdict["preview_extrusion_width"] = _("Width of Extrusion in Preview (default: 0.5)")
self.helpdict["preview_grid_step1"] = _("Fine Grid Spacing (default: 10)")
self.helpdict["preview_grid_step2"] = _("Coarse Grid Spacing (default: 50)")
self.filename=filename self.filename=filename
os.putenv("UBUNTU_MENUPROXY","0") os.putenv("UBUNTU_MENUPROXY","0")
wx.Frame.__init__(self,None,title=_("Printer Interface"),size=size); wx.Frame.__init__(self,None,title=_("Printer Interface"),size=size);
...@@ -72,7 +78,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -72,7 +78,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.statuscheck=False self.statuscheck=False
self.tempreport="" self.tempreport=""
self.monitor=0 self.monitor=0
self.f=None self.f=None
self.skeinp=None self.skeinp=None
self.monitor_interval=3 self.monitor_interval=3
self.paused=False self.paused=False
...@@ -678,8 +684,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -678,8 +684,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
obj = e.GetEventObject() obj = e.GetEventObject()
popupmenu=wx.Menu() popupmenu=wx.Menu()
item = popupmenu.Append(-1,_("SD Upload")) item = popupmenu.Append(-1,_("SD Upload"))
if not self.f or not len(self.f): if not self.f or not len(self.f):
item.Enable(False) item.Enable(False)
self.Bind(wx.EVT_MENU,self.upload,id=item.GetId()) self.Bind(wx.EVT_MENU,self.upload,id=item.GetId())
item = popupmenu.Append(-1,_("SD Print")) item = popupmenu.Append(-1,_("SD Print"))
self.Bind(wx.EVT_MENU,self.sdprintfile,id=item.GetId()) self.Bind(wx.EVT_MENU,self.sdprintfile,id=item.GetId())
...@@ -1537,7 +1543,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -1537,7 +1543,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
bdl_float = [float(value) if value else defaults[i] for i, value in enumerate(bdl)] bdl_float = [float(value) if value else defaults[i] for i, value in enumerate(bdl)]
return bdl_float return bdl_float
class macroed(wx.Dialog): class macroed(wx.Dialog):
"""Really simple editor to edit macro definitions""" """Really simple editor to edit macro definitions"""
def __init__(self,macro_name,definition,callback,gcode=False): def __init__(self,macro_name,definition,callback,gcode=False):
...@@ -1607,7 +1612,7 @@ class macroed(wx.Dialog): ...@@ -1607,7 +1612,7 @@ class macroed(wx.Dialog):
if line.strip() != "": if line.strip() != "":
reindented += self.indent_chars + line + "\n" reindented += self.indent_chars + line + "\n"
return reindented return reindented
class options(wx.Dialog): class options(wx.Dialog):
"""Options editor""" """Options editor"""
def __init__(self,pronterface): def __init__(self,pronterface):
...@@ -1619,17 +1624,21 @@ class options(wx.Dialog): ...@@ -1619,17 +1624,21 @@ class options(wx.Dialog):
vbox.Add(grid,0,wx.EXPAND) vbox.Add(grid,0,wx.EXPAND)
ctrls = {} ctrls = {}
for k,v in sorted(pronterface.settings._all_settings().items()): for k,v in sorted(pronterface.settings._all_settings().items()):
grid.Add(wx.StaticText(self,-1,k),0,wx.BOTTOM+wx.RIGHT) ctrls[k,0] = wx.StaticText(self,-1,k)
ctrls[k] = wx.TextCtrl(self,-1,str(v)) ctrls[k,1] = wx.TextCtrl(self,-1,str(v))
grid.Add(ctrls[k],1,wx.EXPAND) if k in pronterface.helpdict:
ctrls[k,0].SetToolTipString(pronterface.helpdict.get(k))
ctrls[k,1].SetToolTipString(pronterface.helpdict.get(k))
grid.Add(ctrls[k,0],0,wx.BOTTOM+wx.RIGHT)
grid.Add(ctrls[k,1],1,wx.EXPAND)
topsizer.Add(self.CreateSeparatedButtonSizer(wx.OK+wx.CANCEL),0,wx.EXPAND) topsizer.Add(self.CreateSeparatedButtonSizer(wx.OK+wx.CANCEL),0,wx.EXPAND)
self.SetSizer(topsizer) self.SetSizer(topsizer)
topsizer.Layout() topsizer.Layout()
topsizer.Fit(self) topsizer.Fit(self)
if self.ShowModal()==wx.ID_OK: if self.ShowModal()==wx.ID_OK:
for k,v in pronterface.settings._all_settings().items(): for k,v in pronterface.settings._all_settings().items():
if ctrls[k].GetValue() != str(v): if ctrls[k,1].GetValue() != str(v):
pronterface.set(k,str(ctrls[k].GetValue())) pronterface.set(k,str(ctrls[k,1].GetValue()))
self.Destroy() self.Destroy()
class ButtonEdit(wx.Dialog): class ButtonEdit(wx.Dialog):
......
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