Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
70b68879
Commit
70b68879
authored
Aug 13, 2012
by
kliment
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #269 from Traumflug/experimental
Add debug option to menu
parents
8b83ba62
24e2fa93
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
19 deletions
+20
-19
dot.pronsolerc.example
dot.pronsolerc.example
+1
-12
pronsole.py
pronsole.py
+4
-2
pronterface.py
pronterface.py
+15
-5
No files found.
.pronsolerc.example
→
dot
.pronsolerc.example
View file @
70b68879
# 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:
...
...
@@ -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
pronsole.py
View file @
70b68879
...
...
@@ -874,6 +874,7 @@ class pronsole(cmd.Cmd):
def
default
(
self
,
l
):
if
(
l
[
0
]
in
self
.
commandprefixes
.
upper
()):
if
(
self
.
p
and
self
.
p
.
online
):
if
(
not
self
.
p
.
loud
):
print
"SENDING:"
+
l
self
.
p
.
send_now
(
l
)
else
:
...
...
@@ -881,6 +882,7 @@ class pronsole(cmd.Cmd):
return
elif
(
l
[
0
]
in
self
.
commandprefixes
.
lower
()):
if
(
self
.
p
and
self
.
p
.
online
):
if
(
not
self
.
p
.
loud
):
print
"SENDING:"
+
l
.
upper
()
self
.
p
.
send_now
(
l
.
upper
())
else
:
...
...
pronterface.py
View file @
70b68879
...
...
@@ -436,6 +436,12 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
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")))
...
...
@@ -543,14 +549,15 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
rescanbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Port"
),
size
=
buttonSize
)
self
.
rescanbtn
.
SetToolTip
(
wx
.
ToolTip
(
"Communication Settings
\n
Click 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"
],
...
...
@@ -562,20 +569,22 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
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
...
...
@@ -1314,7 +1323,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
else
:
wx
.
CallAfter
(
self
.
graph
.
StopPlotting
)
def
setloud
(
self
,
e
):
self
.
p
.
loud
=
e
.
IsChecked
()
def
sendline
(
self
,
e
):
command
=
self
.
commandbox
.
GetValue
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment