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
f190ec86
Commit
f190ec86
authored
Jul 13, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always sleep a little bit in status checker thread
parent
0b8113ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
pronterface.py
pronterface.py
+5
-2
No files found.
pronterface.py
View file @
f190ec86
...
@@ -1308,15 +1308,18 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1308,15 +1308,18 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self
.
p
.
send_now
(
"M105"
)
self
.
p
.
send_now
(
"M105"
)
cur_time
=
time
.
time
()
cur_time
=
time
.
time
()
wait_time
=
0
wait_time
=
0
while
time
.
time
()
<
cur_time
+
self
.
monitor_interval
:
while
time
.
time
()
<
cur_time
+
self
.
monitor_interval
-
0.25
:
if
not
self
.
statuscheck
:
if
not
self
.
statuscheck
:
break
break
time
.
sleep
(
0.25
)
time
.
sleep
(
0.25
)
# Safeguard: if system time changes and goes back in the past,
# Safeguard: if system time changes and goes back in the past,
# we could get stuck almost forever
# we could get stuck almost forever
wait_time
+=
0.25
wait_time
+=
0.25
if
wait_time
>
self
.
monitor_interval
:
if
wait_time
>
self
.
monitor_interval
-
0.25
:
break
break
# Always sleep at least a bit, if something goes wrong with the
# system time we'll avoid freezing the whole app this way
time
.
sleep
(
0.25
)
try
:
try
:
while
not
self
.
sentlines
.
empty
():
while
not
self
.
sentlines
.
empty
():
gc
=
self
.
sentlines
.
get_nowait
()
gc
=
self
.
sentlines
.
get_nowait
()
...
...
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