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
29f982e9
Commit
29f982e9
authored
Jun 22, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update displayed temperature targets when processing M105 replies (#367)
parent
e5e6349a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
pronterface.py
pronterface.py
+24
-7
No files found.
pronterface.py
View file @
29f982e9
...
@@ -50,7 +50,7 @@ import pronsole
...
@@ -50,7 +50,7 @@ import pronsole
from
pronsole
import
dosify
,
wxSetting
,
HiddenSetting
,
StringSetting
,
SpinSetting
,
FloatSpinSetting
,
BooleanSetting
,
StaticTextSetting
from
pronsole
import
dosify
,
wxSetting
,
HiddenSetting
,
StringSetting
,
SpinSetting
,
FloatSpinSetting
,
BooleanSetting
,
StaticTextSetting
from
printrun
import
gcoder
from
printrun
import
gcoder
tempreport_exp
=
re
.
compile
(
"([TB]
\
d*):([-+]?
\
d*
\
.?
\
d*)(?:
\
/)?([-+]?
\
d*
\
.?
\
d*)"
)
tempreport_exp
=
re
.
compile
(
"([TB]
\
d*):([-+]?
\
d*
\
.?
\
d*)(?:
?
\
/)?([-+]?
\
d*
\
.?
\
d*)"
)
def
parse_temperature_report
(
report
):
def
parse_temperature_report
(
report
):
matches
=
tempreport_exp
.
findall
(
report
)
matches
=
tempreport_exp
.
findall
(
report
)
...
@@ -1226,15 +1226,32 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1226,15 +1226,32 @@ class PronterWindow(MainWindow, pronsole.pronsole):
if
"T0"
in
temps
:
if
"T0"
in
temps
:
hotend_temp
=
float
(
temps
[
"T0"
][
0
])
hotend_temp
=
float
(
temps
[
"T0"
][
0
])
else
:
else
:
hotend_temp
=
float
(
temps
[
"T"
][
0
])
if
"T"
in
temps
else
-
1.0
hotend_temp
=
float
(
temps
[
"T"
][
0
])
if
"T"
in
temps
else
None
if
self
.
display_graph
:
wx
.
CallAfter
(
self
.
graph
.
SetExtruder0Temperature
,
hotend_temp
)
if
hotend_temp
is
not
None
:
if
self
.
display_gauges
:
wx
.
CallAfter
(
self
.
hottgauge
.
SetValue
,
hotend_temp
)
if
self
.
display_graph
:
wx
.
CallAfter
(
self
.
graph
.
SetExtruder0Temperature
,
hotend_temp
)
if
self
.
display_gauges
:
wx
.
CallAfter
(
self
.
hottgauge
.
SetValue
,
hotend_temp
)
setpoint
=
None
if
"T0"
in
temps
and
temps
[
"T0"
][
1
]:
setpoint
=
float
(
temps
[
"T0"
][
1
])
elif
temps
[
"T"
][
1
]:
setpoint
=
float
(
temps
[
"T"
][
1
])
if
setpoint
is
not
None
:
if
self
.
display_graph
:
wx
.
CallAfter
(
self
.
graph
.
SetExtruder0TargetTemperature
,
setpoint
)
if
self
.
display_gauges
:
wx
.
CallAfter
(
self
.
hottgauge
.
SetTarget
,
setpoint
)
if
"T1"
in
temps
:
if
"T1"
in
temps
:
hotend_temp
=
float
(
temps
[
"T1"
][
0
])
hotend_temp
=
float
(
temps
[
"T1"
][
0
])
if
self
.
display_graph
:
wx
.
CallAfter
(
self
.
graph
.
SetExtruder1Temperature
,
hotend_temp
)
if
self
.
display_graph
:
wx
.
CallAfter
(
self
.
graph
.
SetExtruder1Temperature
,
hotend_temp
)
bed_temp
=
float
(
temps
[
"B"
][
0
])
if
"B"
in
temps
else
-
1.0
setpoint
=
temps
[
"T1"
][
1
]
if
self
.
display_graph
:
wx
.
CallAfter
(
self
.
graph
.
SetBedTemperature
,
bed_temp
)
if
setpoint
and
self
.
display_graph
:
if
self
.
display_gauges
:
wx
.
CallAfter
(
self
.
bedtgauge
.
SetValue
,
bed_temp
)
wx
.
CallAfter
(
self
.
graph
.
SetExtruder1TargetTemperature
,
float
(
setpoint
))
bed_temp
=
float
(
temps
[
"B"
][
0
])
if
"B"
in
temps
else
None
if
bed_temp
is
not
None
:
if
self
.
display_graph
:
wx
.
CallAfter
(
self
.
graph
.
SetBedTemperature
,
bed_temp
)
if
self
.
display_gauges
:
wx
.
CallAfter
(
self
.
bedtgauge
.
SetValue
,
bed_temp
)
setpoint
=
temps
[
"B"
][
1
]
if
setpoint
:
setpoint
=
float
(
setpoint
)
if
self
.
display_graph
:
wx
.
CallAfter
(
self
.
graph
.
SetBedTargetTemperature
,
setpoint
)
if
self
.
display_gauges
:
wx
.
CallAfter
(
self
.
bedtgauge
.
SetTarget
,
setpoint
)
except
:
except
:
traceback
.
print_exc
()
traceback
.
print_exc
()
...
...
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