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
e49db513
Commit
e49db513
authored
Jun 27, 2013
by
D1plo1d
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental' of github.com:kliment/Printrun into experimental
parents
43b328db
557fed2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
21 deletions
+28
-21
pronsole.py
pronsole.py
+15
-14
pronterface.py
pronterface.py
+13
-7
No files found.
pronsole.py
View file @
e49db513
...
@@ -1121,21 +1121,22 @@ class pronsole(cmd.Cmd):
...
@@ -1121,21 +1121,22 @@ class pronsole(cmd.Cmd):
return
[
i
for
i
in
self
.
temps
.
keys
()
if
i
.
startswith
(
text
)]
return
[
i
for
i
in
self
.
temps
.
keys
()
if
i
.
startswith
(
text
)]
def
do_bedtemp
(
self
,
l
):
def
do_bedtemp
(
self
,
l
):
try
:
f
=
None
l
=
l
.
lower
()
.
replace
(
", "
,
"."
)
try
:
for
i
in
self
.
bedtemps
.
keys
():
l
=
l
.
lower
()
.
replace
(
", "
,
"."
)
l
=
l
.
replace
(
i
,
self
.
bedtemps
[
i
])
for
i
in
self
.
bedtemps
.
keys
():
f
=
float
(
l
)
l
=
l
.
replace
(
i
,
self
.
bedtemps
[
i
])
except
:
f
=
float
(
l
)
self
.
logError
(
_
(
"You must enter a temperature."
))
except
:
if
f
>=
0
:
self
.
logError
(
_
(
"You must enter a temperature."
))
if
self
.
p
.
online
:
if
f
is
not
None
and
f
>=
0
:
self
.
p
.
send_now
(
"M140 S"
+
l
)
if
self
.
p
.
online
:
self
.
log
(
_
(
"Setting bed temperature to
%
s degrees Celsius."
)
%
f
)
self
.
p
.
send_now
(
"M140 S"
+
l
)
else
:
self
.
log
(
_
(
"Setting bed temperature to
%
s degrees Celsius."
)
%
f
)
self
.
logError
(
_
(
"Printer is not online."
))
else
:
else
:
self
.
logError
(
_
(
"You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0."
))
self
.
logError
(
_
(
"Printer is not online."
))
else
:
self
.
logError
(
_
(
"You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0."
))
def
help_bedtemp
(
self
):
def
help_bedtemp
(
self
):
self
.
log
(
_
(
"Sets the bed temperature to the value entered."
))
self
.
log
(
_
(
"Sets the bed temperature to the value entered."
))
...
...
pronterface.py
View file @
e49db513
...
@@ -233,6 +233,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -233,6 +233,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self
.
monitor_interval
=
3
self
.
monitor_interval
=
3
self
.
current_pos
=
[
0
,
0
,
0
]
self
.
current_pos
=
[
0
,
0
,
0
]
self
.
paused
=
False
self
.
paused
=
False
self
.
uploading
=
False
self
.
sentlines
=
Queue
.
Queue
(
0
)
self
.
sentlines
=
Queue
.
Queue
(
0
)
self
.
cpbuttons
=
[
self
.
cpbuttons
=
[
SpecialButton
(
_
(
"Motors off"
),
(
"M84"
),
(
250
,
250
,
250
),
None
,
0
,
_
(
"Switch all motors off"
)),
SpecialButton
(
_
(
"Motors off"
),
(
"M84"
),
(
250
,
250
,
250
),
None
,
0
,
_
(
"Switch all motors off"
)),
...
@@ -1276,9 +1277,14 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1276,9 +1277,14 @@ class PronterWindow(MainWindow, pronsole.pronsole):
while
self
.
statuscheck
:
while
self
.
statuscheck
:
string
=
""
string
=
""
fractioncomplete
=
0.0
fractioncomplete
=
0.0
if
self
.
sdprinting
:
if
self
.
sdprinting
or
self
.
uploading
:
fractioncomplete
=
float
(
self
.
percentdone
/
100.0
)
if
self
.
uploading
:
string
+=
_
(
" SD printing:
%04.2
f
%%
"
)
%
(
self
.
percentdone
,)
fractioncomplete
=
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
)
string
+=
_
(
"SD upload:
%04.2
f
%%
|"
)
%
(
100
*
fractioncomplete
,)
string
+=
_
(
" Line#
%
d of
%
d lines |"
)
%
(
self
.
p
.
queueindex
,
len
(
self
.
p
.
mainqueue
))
else
:
fractioncomplete
=
float
(
self
.
percentdone
/
100.0
)
string
+=
_
(
"SD printing:
%04.2
f
%%
|"
)
%
(
self
.
percentdone
,)
if
fractioncomplete
>
0.0
:
if
fractioncomplete
>
0.0
:
secondselapsed
=
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)
secondselapsed
=
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)
secondsestimate
=
secondselapsed
/
fractioncomplete
secondsestimate
=
secondselapsed
/
fractioncomplete
...
@@ -1286,9 +1292,9 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1286,9 +1292,9 @@ class PronterWindow(MainWindow, pronsole.pronsole):
string
+=
_
(
" Est:
%
s of
%
s remaining | "
)
%
(
format_duration
(
secondsremain
),
string
+=
_
(
" Est:
%
s of
%
s remaining | "
)
%
(
format_duration
(
secondsremain
),
format_duration
(
secondsestimate
))
format_duration
(
secondsestimate
))
string
+=
_
(
" Z:
%.3
f mm"
)
%
self
.
curlayer
string
+=
_
(
" Z:
%.3
f mm"
)
%
self
.
curlayer
if
self
.
p
.
printing
:
el
if
self
.
p
.
printing
:
fractioncomplete
=
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
)
fractioncomplete
=
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
)
string
+=
_
(
"
Printing:
%04.2
f
%%
|"
)
%
(
100
*
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
),)
string
+=
_
(
"Printing:
%04.2
f
%%
|"
)
%
(
100
*
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
),)
string
+=
_
(
" Line#
%
d of
%
d lines |"
)
%
(
self
.
p
.
queueindex
,
len
(
self
.
p
.
mainqueue
))
string
+=
_
(
" Line#
%
d of
%
d lines |"
)
%
(
self
.
p
.
queueindex
,
len
(
self
.
p
.
mainqueue
))
if
self
.
p
.
queueindex
>
0
:
if
self
.
p
.
queueindex
>
0
:
secondselapsed
=
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)
secondselapsed
=
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)
...
@@ -1607,8 +1613,8 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1607,8 +1613,8 @@ class PronterWindow(MainWindow, pronsole.pronsole):
dlg
=
wx
.
TextEntryDialog
(
self
,
(
"Enter a target filename in 8.3 format:"
),
_
(
"Pick SD filename"
)
,
dosify
(
self
.
filename
))
dlg
=
wx
.
TextEntryDialog
(
self
,
(
"Enter a target filename in 8.3 format:"
),
_
(
"Pick SD filename"
)
,
dosify
(
self
.
filename
))
if
dlg
.
ShowModal
()
==
wx
.
ID_OK
:
if
dlg
.
ShowModal
()
==
wx
.
ID_OK
:
self
.
p
.
send_now
(
"M21"
)
self
.
p
.
send_now
(
"M21"
)
self
.
p
.
send_now
(
"M28 "
+
str
(
dlg
.
GetValue
()))
self
.
p
.
send_now
(
"M28 "
+
str
(
dlg
.
GetValue
()))
self
.
recvlisteners
+=
[
self
.
uploadtrigger
]
self
.
recvlisteners
.
append
(
self
.
uploadtrigger
)
dlg
.
Destroy
()
dlg
.
Destroy
()
def
pause
(
self
,
event
):
def
pause
(
self
,
event
):
...
...
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