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
a377b85c
Commit
a377b85c
authored
Jan 12, 2013
by
Chris Olah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the dynamic prompt temperature stuff configurable.
parent
a224a10c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
pronsole.py
pronsole.py
+5
-2
No files found.
pronsole.py
View file @
a377b85c
...
@@ -218,6 +218,7 @@ class pronsole(cmd.Cmd):
...
@@ -218,6 +218,7 @@ class pronsole(cmd.Cmd):
if
not
READLINE
:
if
not
READLINE
:
self
.
completekey
=
None
self
.
completekey
=
None
self
.
status
=
Status
()
self
.
status
=
Status
()
self
.
dynamic_temp
=
False
self
.
p
=
printcore
.
printcore
()
self
.
p
=
printcore
.
printcore
()
self
.
p
.
recvcb
=
self
.
recvcb
self
.
p
.
recvcb
=
self
.
recvcb
self
.
recvlisteners
=
[]
self
.
recvlisteners
=
[]
...
@@ -267,7 +268,7 @@ class pronsole(cmd.Cmd):
...
@@ -267,7 +268,7 @@ class pronsole(cmd.Cmd):
return
"..>"
return
"..>"
elif
not
self
.
p
.
online
:
elif
not
self
.
p
.
online
:
return
"uninitialized>"
return
"uninitialized>"
elif
self
.
status
.
extruder_enabled
:
# and not self.status.bed_enabled
:
elif
self
.
status
.
extruder_enabled
and
self
.
dynamic_temp
:
if
self
.
status
.
extruder_temp_target
==
0
:
if
self
.
status
.
extruder_temp_target
==
0
:
return
"T:
%
s>"
%
self
.
status
.
extruder_temp
return
"T:
%
s>"
%
self
.
status
.
extruder_temp
else
:
else
:
...
@@ -280,7 +281,7 @@ class pronsole(cmd.Cmd):
...
@@ -280,7 +281,7 @@ class pronsole(cmd.Cmd):
each command is executed, for the next prompt.
each command is executed, for the next prompt.
We also use it to send M105 commands so that
We also use it to send M105 commands so that
temp info gets updated for the prompt."""
temp info gets updated for the prompt."""
if
self
.
p
.
online
:
if
self
.
p
.
online
and
self
.
dynamic_temp
:
self
.
p
.
send_now
(
"M105"
)
self
.
p
.
send_now
(
"M105"
)
self
.
prompt
=
self
.
promptf
()
self
.
prompt
=
self
.
promptf
()
return
stop
return
stop
...
@@ -907,6 +908,8 @@ class pronsole(cmd.Cmd):
...
@@ -907,6 +908,8 @@ class pronsole(cmd.Cmd):
self
.
do_help
(
""
)
self
.
do_help
(
""
)
def
do_gettemp
(
self
,
l
):
def
do_gettemp
(
self
,
l
):
if
"dynamic"
in
l
:
self
.
dynamic_temp
=
True
if
self
.
p
.
online
:
if
self
.
p
.
online
:
self
.
p
.
send_now
(
"M105"
)
self
.
p
.
send_now
(
"M105"
)
time
.
sleep
(
0.75
)
time
.
sleep
(
0.75
)
...
...
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