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
7d8c0bdc
Commit
7d8c0bdc
authored
Aug 11, 2012
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase serial read timeout for initial connection loop
parent
c5475def
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
printcore.py
printcore.py
+3
-0
No files found.
printcore.py
View file @
7d8c0bdc
...
@@ -134,6 +134,8 @@ class printcore():
...
@@ -134,6 +134,8 @@ class printcore():
return
not
self
.
stop_read_thread
and
self
.
printer
and
self
.
printer
.
isOpen
()
return
not
self
.
stop_read_thread
and
self
.
printer
and
self
.
printer
.
isOpen
()
def
_listen_until_online
(
self
):
def
_listen_until_online
(
self
):
orig_timeout
=
self
.
printer
.
timeout
self
.
printer
.
timeout
=
3
while
not
self
.
online
and
self
.
_listen_can_continue
():
while
not
self
.
online
and
self
.
_listen_can_continue
():
self
.
_send
(
"M105"
)
self
.
_send
(
"M105"
)
while
self
.
_listen_can_continue
():
while
self
.
_listen_can_continue
():
...
@@ -144,6 +146,7 @@ class printcore():
...
@@ -144,6 +146,7 @@ class printcore():
if
self
.
onlinecb
:
if
self
.
onlinecb
:
try
:
self
.
onlinecb
()
try
:
self
.
onlinecb
()
except
:
pass
except
:
pass
self
.
printer
.
timeout
=
orig_timeout
self
.
online
=
True
self
.
online
=
True
return
return
time
.
sleep
(
0.25
)
time
.
sleep
(
0.25
)
...
...
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