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
571e4402
Commit
571e4402
authored
Jun 09, 2011
by
kliment
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make pronsole importable. Add homing command
parent
85ec523a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
7 deletions
+45
-7
.pronsolerc
.pronsolerc
+0
-1
pronsole.py
pronsole.py
+45
-6
No files found.
.pronsolerc
View file @
571e4402
...
@@ -2,4 +2,3 @@
...
@@ -2,4 +2,3 @@
alias up move Z 10
alias up move Z 10
alias loud !self.p.loud = 1
alias loud !self.p.loud = 1
alias quiet !self.p.loud = 0
alias quiet !self.p.loud = 0
alias home_all G28
pronsole.py
View file @
571e4402
...
@@ -784,9 +784,48 @@ class pronsole(cmd.Cmd):
...
@@ -784,9 +784,48 @@ class pronsole(cmd.Cmd):
print
"skein set - adjust skeinforge settings"
print
"skein set - adjust skeinforge settings"
interp
=
pronsole
()
def
do_home
(
self
,
l
):
try
:
if
not
self
.
p
.
online
:
print
"Printer is not online. Unable to move."
return
if
self
.
p
.
printing
:
print
"Printer is currently printing. Please pause the print before you issue manual commands."
return
if
"x"
in
l
.
lower
():
self
.
do_move
(
"X -250"
)
send_now
(
"G92 X0"
)
self
.
do_move
(
"X 1"
)
self
.
do_move
(
"X -1"
)
send_now
(
"G92 X0"
)
if
"y"
in
l
.
lower
():
self
.
do_move
(
"Y -250"
)
send_now
(
"G92 Y0"
)
self
.
do_move
(
"Y 1"
)
self
.
do_move
(
"Y -1"
)
send_now
(
"G92 Y0"
)
if
"z"
in
l
.
lower
():
self
.
do_move
(
"Z -250"
)
send_now
(
"G92 Z0"
)
self
.
do_move
(
"Z 1"
)
self
.
do_move
(
"Z -1"
)
send_now
(
"G92 Z0"
)
if
not
len
(
l
):
send_now
(
"G28"
)
def
help_home
(
self
):
print
"Homes the printer"
print
"home - homes all axes (Using G28)"
print
"home xy - homes x and y axes (Using G1 and G92)"
print
"home z - homes z axis only (Using G1 and G92)"
print
"home xyz - homes all axes (Using G1 and G92)"
if
__name__
==
"__main__"
:
interp
=
pronsole
()
try
:
interp
.
cmdloop
()
interp
.
cmdloop
()
except
:
except
:
interp
.
p
.
disconnect
()
interp
.
p
.
disconnect
()
raise
raise
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