Skip to content

Commit

Permalink
changed polling period to use less cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
jensen committed Jan 25, 2013
1 parent 06f014b commit 705ea85
Show file tree
Hide file tree
Showing 2 changed files with 600 additions and 599 deletions.
5 changes: 3 additions & 2 deletions LinuxCNCWebSktSvr.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
import base64
#import rpdb2

UpdateStatusPollPeriodInMilliSeconds = 5
UpdateStatusPollPeriodInMilliSeconds = 50
UpdateHALPollPeriodDivisor = 1
eps = float(0.000001)

main_loop = tornado.ioloop.IOLoop.instance()
Expand Down Expand Up @@ -132,7 +133,7 @@ def hal_poll_update(self):
def poll_update(self):
global linuxcnc_command
# update HAL pins, and also check if linuxcnc is up and running
if self.counter > 10:
if self.counter > UpdateHALPollPeriodDivisor:
self.hal_poll_update()
self.counter = 0
else:
Expand Down
Loading

0 comments on commit 705ea85

Please sign in to comment.