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 / 26694
  Re: Drive types
 
(...) Hello John, Could you comment a little the use of Precedes/Follows for task switching? I have trouble figuring when to use one or the other (or both?) Thanks in advance, Philo (18 years ago, 9-Jan-07, to lugnet.robotics)
 
  Re: Drive types
 
(...) Here is a simple multi-threaded NQC program: task music() { while (true) { PlayTone(262,40); Wait(50); PlayTone(294,40); Wait(50); PlayTone(330,40); Wait(50); PlayTone(294,40); Wait(50); } } task main() { start music; while(true) { (...) (18 years ago, 9-Jan-07, to lugnet.robotics)
 
  Re: Drive types
 
(...) Whoops. The duration values in each of the PlayTone calls should be 400 rather than 40. John Hansen (18 years ago, 9-Jan-07, to lugnet.robotics)
 
  Re: Drive types
 
(...) Thanks John - quite clear now. Though I still don't understand why there are 2 different opcodes that can be used for more or less the same thing??? Philo (18 years ago, 9-Jan-07, to lugnet.robotics)
 
  Re: Drive types
 
(...) The presence of both opcodes comes from the early days of NBC when I was trying to understand the executable file format (before the days of documentation) and I knew that in the NXT-G compiler a clump had both upstream and downstream (...) (18 years ago, 9-Jan-07, to lugnet.robotics)
 
  Re: Drive types
 
(...) Besides Precedes and Follows, are there other ways to start additional threads? Specifically, I'd like to start additional threads and then continue the execution of the current thread. I might be misinterpreting this, but it seems that (...) (18 years ago, 13-Jan-07, to lugnet.robotics)
 
  Re: Drive types
 
(...) The problem is that the standard firmware doesn't support starting and stopping of threads AFAIK. But you can start multiple threads by putting precedes thread1, thread2 in your main thread, when it exits both threads will start getting time (...) (18 years ago, 13-Jan-07, to lugnet.robotics)
 
  Re: Drive types
 
(...) Rosco is correct. The standard NXT firmware uses a completely different execution model than the old RCX firmware uses. The NXT firmware does not provide any mechanism at all for starting and stopping threads. The only mechanism is to define (...) (18 years ago, 14-Jan-07, to lugnet.robotics)

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