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
e5e6349a
Commit
e5e6349a
authored
Jun 21, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wrong indent and rework some logic (#401)
parent
f57eb1d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
printcore.py
printcore.py
+4
-3
No files found.
printcore.py
View file @
e5e6349a
...
@@ -227,16 +227,17 @@ class printcore():
...
@@ -227,16 +227,17 @@ class printcore():
# meaning no data was received thus we count those empty lines,
# meaning no data was received thus we count those empty lines,
# and once we have seen 5 in a row, we just break and send a
# and once we have seen 5 in a row, we just break and send a
# new M105
# new M105
if
not
line
:
empty_lines
+=
1
if
not
line
:
empty_lines
+=
1
if
empty_lines
==
5
:
break
else
:
empty_lines
=
0
else
:
empty_lines
=
0
if
empty_lines
==
5
:
break
if
line
.
startswith
(
tuple
(
self
.
greetings
))
or
line
.
startswith
(
'ok'
)
or
"T:"
in
line
:
if
line
.
startswith
(
tuple
(
self
.
greetings
))
or
line
.
startswith
(
'ok'
)
or
"T:"
in
line
:
if
self
.
onlinecb
:
if
self
.
onlinecb
:
try
:
self
.
onlinecb
()
try
:
self
.
onlinecb
()
except
:
pass
except
:
pass
self
.
online
=
True
self
.
online
=
True
return
return
time
.
sleep
(
0.25
)
time
.
sleep
(
0.25
)
def
_listen
(
self
):
def
_listen
(
self
):
"""This function acts on messages from the firmware
"""This function acts on messages from the firmware
...
...
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