To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 4554
4553  |  4555
Subject: 
Re: preventing IR tower shutdown
Newsgroups: 
lugnet.robotics
Date: 
Thu, 15 Apr 1999 00:44:34 GMT
Original-From: 
Ron Beck <rtb@richmond.+antispam+infi.net>
Reply-To: 
rtb@richmond.STOPSPAMinfi.net
Viewed: 
993 times
  
Laurentino Martins wrote:
Simply put, what happened was that a simple FOR/WHILE cycle waiting
for a response of the unit was so processor intensive, that the timer
would never get executed (since the timer it's a lot priority call).
I fixed it by pumping the system messages while running that FOR/WHILE
cycle so that the timer would work.

You can pump the messages in C++ like this:
    while( ::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
       AfxGetThread()->PumpMessage();
The VB code should be similar (?).

Laurentino Martins

In VB you would probably want to put a DoEvents in such a tight loop.
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



Message is in Reply To:
  Re: preventing IR tower shutdown
 
(...) I had a problem that happened a lot to me in Visual C++ and that might be or not be related with your problem. Simply put, what happened was that a simple FOR/WHILE cycle waiting for a response of the unit was so processor intensive, that the (...) (25 years ago, 14-Apr-99, to lugnet.robotics)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR