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
0a5cb2d9
Commit
0a5cb2d9
authored
Jun 23, 2011
by
Nathan Zadoks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gave extruder calibration script slightly more sensible defaults.
parent
48b981f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
calibrateextruder.py
calibrateextruder.py
+6
-3
No files found.
calibrateextruder.py
View file @
0a5cb2d9
...
...
@@ -12,7 +12,7 @@ try:
from
printdummy
import
printcore
except
ImportError
:
from
printcore
import
printcore
import
time
,
getopt
,
sys
import
time
,
getopt
,
sys
,
os
def
float_input
(
prompt
=
''
):
import
sys
...
...
@@ -36,6 +36,9 @@ def wait(t,m=''):
time
.
sleep
(
1.0
/
5
)
print
if
not
os
.
path
.
exists
(
port
):
port
=
0
#Parse options
help
=
"""
%
s [ -l DISTANCE ] [ -s STEPS ] [ -p PORT ]
...
...
@@ -43,7 +46,7 @@ help="""
-s --steps Initial amount of steps to use (default:
%
d steps)
-p --port Serial port the printer is connected to (default:
%
s)
-h --help This cruft.
"""
[
1
:
-
1
]
%
(
sys
.
argv
[
0
],
n
,
k
,
port
)
"""
[
1
:
-
1
]
%
(
sys
.
argv
[
0
],
n
,
k
,
port
if
port
else
'auto'
)
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
"hl:s:p:"
,[
"help"
,
"length="
,
"steps="
,
"port="
])
except
getopt
.
GetoptError
,
err
:
...
...
@@ -64,7 +67,7 @@ print "Initial parameters"
print
"Steps per mm:
%3
d steps"
%
k
print
"Length extruded:
%3
d mm"
%
n
print
print
"Serial port:
%
s"
%
port
print
"Serial port:
%
s"
%
(
port
if
port
else
'auto'
)
#Connect to printer
print
"Connecting to printer.."
,
...
...
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