Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As discussed in issue #267 #269

Merged
merged 5 commits into from
Aug 13, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions .pronsolerc.example → dot.pronsolerc.example
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
# Sample .pronsolerc file - copy this into your home directory and rename it to .pronsolerc
!print "Loaded " + self.rc_filename

macro loud
!if self.p.loud:
!self.p.loud = 0
!if hasattr(self,"cur_button") and self.cur_button is not None:
!self.onecmd('button %d "loud (off)" /c green loud' % self.cur_button)
!else:
!self.p.loud = 1
!if hasattr(self,"cur_button") and self.cur_button is not None:
!self.onecmd('button %d "loud (on)" /c yellow loud' % self.cur_button)
button 0 "loud (off)" /c "green" loud

macro fan
!global _fan
!if '_fan' in globals() and _fan:
Expand All @@ -24,4 +13,4 @@ macro fan
M106
!if hasattr(self,"cur_button") and self.cur_button is not None:
!self.onecmd('button %d "fan (on)" /c yellow fan' % self.cur_button)
button 1 "fan (off)" /c "green" fan
button 0 "fan (off)" /c "green" fan
6 changes: 4 additions & 2 deletions pronsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,14 +874,16 @@ def help_shell(self):
def default(self,l):
if(l[0] in self.commandprefixes.upper()):
if(self.p and self.p.online):
print "SENDING:"+l
if(not self.p.loud):
print "SENDING:"+l
self.p.send_now(l)
else:
print "Printer is not online."
return
elif(l[0] in self.commandprefixes.lower()):
if(self.p and self.p.online):
print "SENDING:"+l.upper()
if(not self.p.loud):
print "SENDING:"+l.upper()
self.p.send_now(l.upper())
else:
print "Printer is not online."
Expand Down
20 changes: 15 additions & 5 deletions pronterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@ def popmenu(self):
self.Bind(wx.EVT_MENU, lambda *e:options(self), m.Append(-1,_("&Options"),_(" Options dialog")))

self.Bind(wx.EVT_MENU, lambda x:threading.Thread(target=lambda :self.do_skein("set")).start(), m.Append(-1,_("Slicing Settings"),_(" Adjust slicing settings")))

mItem = m.AppendCheckItem(-1, _("Debug G-code"),
_("Print all G-code sent to and received from the printer."))
m.Check(mItem.GetId(), self.p.loud)
self.Bind(wx.EVT_MENU, self.setloud, mItem)

#try:
# from SkeinforgeQuickEditDialog import SkeinforgeQuickEditDialog
# self.Bind(wx.EVT_MENU, lambda *e:SkeinforgeQuickEditDialog(self), m.Append(-1,_("SFACT Quick Settings"),_(" Quickly adjust SFACT settings for active profile")))
Expand Down Expand Up @@ -543,14 +549,15 @@ def popwindow(self):
self.rescanbtn=wx.Button(self.panel,-1,_("Port"),size=buttonSize)
self.rescanbtn.SetToolTip(wx.ToolTip("Communication Settings\nClick to rescan ports"))
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, size=(100, 25))
self.serialport.SetToolTip(wx.ToolTip("Select Port Printer is connected to"))
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"],
Expand All @@ -562,20 +569,22 @@ def popwindow(self):
except:
pass
uts.Add(self.baud)

self.connectbtn=wx.Button(self.panel,-1,_("Connect"), size=buttonSize)
uts.Add(self.connectbtn)
self.connectbtn.SetToolTip(wx.ToolTip("Connect to the printer"))
self.connectbtn.Bind(wx.EVT_BUTTON,self.connect)
uts.Add(self.connectbtn)

self.resetbtn=wx.Button(self.panel,-1,_("Reset"),style=wx.BU_EXACTFIT,size=(-1,buttonSize[1]))
self.resetbtn.Bind(wx.EVT_BUTTON,self.reset)
self.resetbtn.SetToolTip(wx.ToolTip("Reset the printer"))
uts.Add(self.resetbtn)
#self.minibtn=wx.Button(self.panel,-1,_("Mini mode"),style=wx.BU_EXACTFIT)
#self.minibtn.Bind(wx.EVT_BUTTON,self.toggleview)

#uts.Add((25,-1))

#uts.Add((15,-1),flag=wx.EXPAND)
#self.minibtn=wx.Button(self.panel,-1,_("Mini mode"),style=wx.BU_EXACTFIT)
#self.minibtn.Bind(wx.EVT_BUTTON,self.toggleview)
#uts.Add(self.minibtn,0,wx.ALIGN_CENTER)

#SECOND ROW
Expand Down Expand Up @@ -1314,7 +1323,8 @@ def setmonitor(self,e):
else:
wx.CallAfter(self.graph.StopPlotting)


def setloud(self,e):
self.p.loud=e.IsChecked()

def sendline(self,e):
command=self.commandbox.GetValue()
Expand Down