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
355102cc
Commit
355102cc
authored
Jun 02, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move current layer tracking to pronsole and report in RPC status
parent
97327dfd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
pronsole.py
printrun/pronsole.py
+4
-0
pronterface.py
printrun/pronterface.py
+0
-4
rpc.py
printrun/rpc.py
+2
-0
No files found.
printrun/pronsole.py
View file @
355102cc
...
@@ -465,6 +465,7 @@ class pronsole(cmd.Cmd):
...
@@ -465,6 +465,7 @@ class pronsole(cmd.Cmd):
self
.
p
.
errorcb
=
self
.
logError
self
.
p
.
errorcb
=
self
.
logError
self
.
fgcode
=
None
self
.
fgcode
=
None
self
.
rpc_server
=
None
self
.
rpc_server
=
None
self
.
curlayer
=
0
self
.
listing
=
0
self
.
listing
=
0
self
.
sdfiles
=
[]
self
.
sdfiles
=
[]
self
.
paused
=
False
self
.
paused
=
False
...
@@ -1484,6 +1485,9 @@ class pronsole(cmd.Cmd):
...
@@ -1484,6 +1485,9 @@ class pronsole(cmd.Cmd):
listener
(
l
)
listener
(
l
)
def
layer_change_cb
(
self
,
newlayer
):
def
layer_change_cb
(
self
,
newlayer
):
layerz
=
self
.
fgcode
.
all_layers
[
newlayer
]
.
z
if
layerz
is
not
None
:
self
.
curlayer
=
layerz
if
self
.
compute_eta
:
if
self
.
compute_eta
:
secondselapsed
=
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)
secondselapsed
=
int
(
time
.
time
()
-
self
.
starttime
+
self
.
extra_print_time
)
self
.
compute_eta
.
update_layer
(
newlayer
,
secondselapsed
)
self
.
compute_eta
.
update_layer
(
newlayer
,
secondselapsed
)
...
...
printrun/pronterface.py
View file @
355102cc
...
@@ -228,7 +228,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -228,7 +228,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self
.
p
.
printsendcb
=
self
.
printsentcb
self
.
p
.
printsendcb
=
self
.
printsentcb
self
.
p
.
startcb
=
self
.
startcb
self
.
p
.
startcb
=
self
.
startcb
self
.
p
.
endcb
=
self
.
endcb
self
.
p
.
endcb
=
self
.
endcb
self
.
curlayer
=
0
self
.
cur_button
=
None
self
.
cur_button
=
None
self
.
predisconnect_mainqueue
=
None
self
.
predisconnect_mainqueue
=
None
self
.
predisconnect_queueindex
=
None
self
.
predisconnect_queueindex
=
None
...
@@ -1637,9 +1636,6 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
...
@@ -1637,9 +1636,6 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
def
layer_change_cb
(
self
,
newlayer
):
def
layer_change_cb
(
self
,
newlayer
):
"""Callback when the printed layer changed"""
"""Callback when the printed layer changed"""
pronsole
.
pronsole
.
layer_change_cb
(
self
,
newlayer
)
pronsole
.
pronsole
.
layer_change_cb
(
self
,
newlayer
)
layerz
=
self
.
fgcode
.
all_layers
[
newlayer
]
.
z
if
layerz
is
not
None
:
self
.
curlayer
=
layerz
if
self
.
settings
.
mainviz
!=
"3D"
or
self
.
settings
.
trackcurrentlayer3d
:
if
self
.
settings
.
mainviz
!=
"3D"
or
self
.
settings
.
trackcurrentlayer3d
:
wx
.
CallAfter
(
self
.
gviz
.
setlayer
,
newlayer
)
wx
.
CallAfter
(
self
.
gviz
.
setlayer
,
newlayer
)
...
...
printrun/rpc.py
View file @
355102cc
...
@@ -39,8 +39,10 @@ class ProntRPC(object):
...
@@ -39,8 +39,10 @@ class ProntRPC(object):
temps
=
parse_temperature_report
(
self
.
pronsole
.
tempreadings
)
temps
=
parse_temperature_report
(
self
.
pronsole
.
tempreadings
)
else
:
else
:
temps
=
None
temps
=
None
z
=
self
.
pronsole
.
curlayer
return
{
"filename"
:
self
.
pronsole
.
filename
,
return
{
"filename"
:
self
.
pronsole
.
filename
,
"progress"
:
progress
,
"progress"
:
progress
,
"eta"
:
eta
,
"eta"
:
eta
,
"temps"
:
temps
,
"temps"
:
temps
,
"z"
:
z
,
}
}
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