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
e3af95cd
Commit
e3af95cd
authored
Feb 05, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve temperature report detection
parent
07d66212
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
pronsole.py
printrun/pronsole.py
+4
-1
pronterface.py
printrun/pronterface.py
+3
-1
No files found.
printrun/pronsole.py
View file @
e3af95cd
...
...
@@ -26,6 +26,7 @@ import argparse
import
locale
import
logging
import
traceback
import
re
from
.
import
printcore
from
printrun.printrun_utils
import
install_locale
,
run_command
,
\
...
...
@@ -51,6 +52,8 @@ try:
except
:
READLINE
=
False
# neither readline module is available
tempreading_exp
=
re
.
compile
(
"(^T:| T:)"
)
def
dosify
(
name
):
return
os
.
path
.
split
(
name
)[
1
]
.
split
(
"."
)[
0
][:
8
]
+
".g"
...
...
@@ -1124,7 +1127,7 @@ class pronsole(cmd.Cmd):
return
[
i
for
i
in
self
.
sdfiles
if
i
.
startswith
(
text
)]
def
recvcb
(
self
,
l
):
if
"T:"
in
l
:
if
tempreading_exp
.
findall
(
l
)
:
self
.
tempreadings
=
l
self
.
status
.
update_tempreading
(
l
)
tstring
=
l
.
rstrip
()
...
...
printrun/pronterface.py
View file @
e3af95cd
...
...
@@ -59,6 +59,8 @@ from pronsole import dosify, wxSetting, HiddenSetting, StringSetting, SpinSettin
from
printrun
import
gcoder
tempreport_exp
=
re
.
compile
(
"([TB]
\
d*):([-+]?
\
d*
\
.?
\
d*)(?: ?
\
/)?([-+]?
\
d*
\
.?
\
d*)"
)
tempreading_exp
=
re
.
compile
(
"(^T:| T:)"
)
extruderreading_exp
=
re
.
compile
(
"(^E:| E:)"
)
def
parse_temperature_report
(
report
):
matches
=
tempreport_exp
.
findall
(
report
)
...
...
@@ -1458,7 +1460,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
self
.
userm114
-=
1
else
:
isreport
=
True
if
"ok T:"
in
l
or
(
"T:"
in
l
and
"E:"
in
l
):
if
"ok T:"
in
l
or
(
tempreading_exp
.
findall
(
l
)
and
extruderreading_exp
.
findall
(
l
)
):
self
.
tempreport
=
l
wx
.
CallAfter
(
self
.
tempdisp
.
SetLabel
,
self
.
tempreport
.
strip
()
.
replace
(
"ok "
,
""
))
self
.
update_tempdisplay
()
...
...
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