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
1a9b1502
Commit
1a9b1502
authored
Apr 11, 2013
by
D1plo1d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up the pronserve code
parent
5f195590
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
pronserve.py
pronserve.py
+0
-4
No files found.
pronserve.py
View file @
1a9b1502
...
...
@@ -175,7 +175,6 @@ class Pronserve(pronsole.pronsole):
#self.mdns = MdnsServer()
services
=
({
'type'
:
'_construct._tcp'
,
'port'
:
8888
,
'domain'
:
"local."
})
self
.
mdns
=
mdns
.
publisher
()
.
save_group
({
'name'
:
'pronserve'
,
'services'
:
services
})
self
.
recvcb
(
"T:10 B:20"
)
def
run_sensor_loop
(
self
):
self
.
request_sensor_update
()
...
...
@@ -190,7 +189,6 @@ class Pronserve(pronsole.pronsole):
""" Parses a line of output from the printer via printcore """
l
=
l
.
rstrip
()
print
l
if
"T:"
in
l
:
self
.
_receive_sensor_update
(
l
)
if
l
!=
"ok"
and
not
l
.
startswith
(
"ok T"
)
and
not
l
.
startswith
(
"T:"
):
...
...
@@ -200,12 +198,10 @@ class Pronserve(pronsole.pronsole):
words
=
l
.
split
(
" "
)
words
.
pop
(
0
)
d
=
dict
([
s
.
split
(
":"
)
for
s
in
words
])
print
list
([
(
key
,
value
)
for
key
,
value
in
d
.
iteritems
()])
for
key
,
value
in
d
.
iteritems
():
self
.
__update_item
(
key
,
value
)
print
"loop is over"
self
.
fire
(
"sensor_change"
)
def
__update_item
(
self
,
key
,
value
):
...
...
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