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
00e43ae9
Commit
00e43ae9
authored
Jun 11, 2013
by
D1plo1d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring set temp to work with the prontserve logError exceptions
parent
c942bc6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
pronsole.py
pronsole.py
+18
-16
No files found.
pronsole.py
View file @
00e43ae9
...
@@ -1082,11 +1082,15 @@ class pronsole(cmd.Cmd):
...
@@ -1082,11 +1082,15 @@ class pronsole(cmd.Cmd):
self
.
log
(
_
(
"Read the extruder and bed temperature."
))
self
.
log
(
_
(
"Read the extruder and bed temperature."
))
def
do_settemp
(
self
,
l
):
def
do_settemp
(
self
,
l
):
try
:
l
=
l
.
lower
()
.
replace
(
", "
,
"."
)
l
=
l
.
lower
()
.
replace
(
", "
,
"."
)
for
i
in
self
.
temps
.
keys
():
for
i
in
self
.
temps
.
keys
():
l
=
l
.
replace
(
i
,
self
.
temps
[
i
])
l
=
l
.
replace
(
i
,
self
.
temps
[
i
])
try
:
f
=
float
(
l
)
f
=
float
(
l
)
except
:
self
.
logError
(
_
(
"You must enter a temperature."
))
return
if
f
>=
0
:
if
f
>=
0
:
if
f
>
250
:
if
f
>
250
:
print
_
(
"
%
s is a high temperature to set your extruder to. Are you sure you want to do that?"
)
%
f
print
_
(
"
%
s is a high temperature to set your extruder to. Are you sure you want to do that?"
)
%
f
...
@@ -1099,8 +1103,6 @@ class pronsole(cmd.Cmd):
...
@@ -1099,8 +1103,6 @@ class pronsole(cmd.Cmd):
self
.
logError
(
_
(
"Printer is not online."
))
self
.
logError
(
_
(
"Printer is not online."
))
else
:
else
:
self
.
logError
(
_
(
"You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
))
self
.
logError
(
_
(
"You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
))
except
:
self
.
logError
(
_
(
"You must enter a temperature."
))
def
help_settemp
(
self
):
def
help_settemp
(
self
):
self
.
log
(
_
(
"Sets the hotend temperature to the value entered."
))
self
.
log
(
_
(
"Sets the hotend temperature to the value entered."
))
...
...
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