To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2277
2276  |  2278
Subject: 
Re: multiplexor and legOS
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 4 Feb 2002 23:12:22 GMT
Viewed: 
2238 times
  
#include <sys/time.h>

void systime_set_timeslice (unsigned char slice);


include/sys/time.h:43-45:

#ifdef CONF_TM
#define TM_DEFAULT_SLICE 20 file://!< default multitasking timeslice
#endif

hope that helps,
Albert

"Michael J Ash" <mikeash@csd.uwm.edu> wrote in message
news:Pine.OSF.3.96.1020204011226.17362A-100000@alpha3.csd.uwm.edu...
On Sun, 3 Feb 2002, Mark Falco wrote:

well anyone who looked at the code I attached may have notcied that I • had one
of the msleeps commented out.  Oops, with this now uncommented I at • least see
the second and third light sensors pulse on, but only for an extremely • short
time.  Suring the 1s sleep that follows selecting the port it is the 1st • light
sensor that is always lit.  Any thoughts would still be appreciated, • if/when I
figure it out I'll be sure to post what I was doing wrong.  I've now got • a
rotation sensor hooked up to a regular sensor port and am using it to • vary the
pulse length :)

Don't ask me for a cite, but I seem to remember something about msleep
only having 20ms granularity. If that's the case, your msleep(10) is
either not sleeping at all or is sleeping 20ms, either one of which could
cause problems.

I'd suggest at the very least verifying your timing using sys_time in the
code. If msleep indeed isn't accurate enough, then you could make some
kind of busy-waiting loop.

--
"From now on, we live in a world where man has walked on the moon.
And it's not a miracle, we just decided to go." -- Jim Lovell

Mike Ash - <http://www.mikeash.com/>, <mailto:mail@mikeash.com>




Message is in Reply To:
  Re: multiplexor and legOS
 
(...) Don't ask me for a cite, but I seem to remember something about msleep only having 20ms granularity. If that's the case, your msleep(10) is either not sleeping at all or is sleeping 20ms, either one of which could cause problems. I'd suggest (...) (23 years ago, 4-Feb-02, to lugnet.robotics.rcx.legos)

19 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