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
a94b33dd
Commit
a94b33dd
authored
Feb 11, 2017
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add M114 position report in statusbar
parent
3eee6f47
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
pronsole.py
printrun/pronsole.py
+6
-0
pronterface.py
printrun/pronterface.py
+5
-0
No files found.
printrun/pronsole.py
View file @
a94b33dd
...
...
@@ -156,6 +156,7 @@ class pronsole(cmd.Cmd):
self
.
userm114
=
0
self
.
userm105
=
0
self
.
m105_waitcycles
=
0
self
.
m114_waitcycles
=
5
self
.
macros
=
{}
self
.
history_file
=
"~/.pronsole-history"
self
.
rc_loaded
=
False
...
...
@@ -862,7 +863,10 @@ class pronsole(cmd.Cmd):
self
.
p
.
send_now
(
"M27"
)
if
self
.
m105_waitcycles
%
10
==
0
:
self
.
p
.
send_now
(
"M105"
)
if
self
.
m114_waitcycles
%
10
==
0
:
self
.
p
.
send_now
(
"M114"
)
self
.
m105_waitcycles
+=
1
self
.
m114_waitcycles
+=
1
cur_time
=
time
.
time
()
wait_time
=
0
while
time
.
time
()
<
cur_time
+
self
.
monitor_interval
-
0.25
:
...
...
@@ -1232,6 +1236,8 @@ class pronsole(cmd.Cmd):
if
self
.
userm114
>
0
:
self
.
userm114
-=
1
isreport
|=
REPORT_MANUAL
else
:
self
.
m114_waitcycles
=
0
if
"ok T:"
in
l
or
tempreading_exp
.
findall
(
l
)
or
'ok COOL:'
in
l
:
self
.
tempreadings
=
l
isreport
=
REPORT_TEMP
...
...
printrun/pronterface.py
View file @
a94b33dd
...
...
@@ -219,6 +219,10 @@ class PronterWindow(MainWindow, pronsole.pronsole):
# disable all printer controls until we connect to a printer
self
.
gui_set_disconnected
()
self
.
statusbar
=
self
.
CreateStatusBar
()
self
.
statusbar
.
SetFieldsCount
(
3
)
self
.
statusbar
.
SetStatusWidths
([
-
1
,
30
,
250
]
)
self
.
statusbar
.
SetStatusText
(
" || "
,
1
)
self
.
statusbar
.
SetStatusText
(
_
(
"Not connected to printer."
))
self
.
t
=
ConsoleOutputHandler
(
self
.
catchprint
,
self
.
settings
.
log_path
)
...
...
@@ -1761,6 +1765,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
self
.
logError
(
traceback
.
format_exc
())
def
update_pos
(
self
):
self
.
statusbar
.
SetStatusText
(
str
(
self
.
posreport
)
.
split
(
" E:"
)[
0
],
2
)
bits
=
gcoder
.
m114_exp
.
findall
(
self
.
posreport
)
x
=
None
y
=
None
...
...
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