Subject:
|
Re: Strange BrickOS Timing
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 3 Dec 2003 10:42:20 GMT
|
Viewed:
|
4103 times
|
| |
| |
Hi Gunther,
> maybe someone can explain to me why the current brickOS release seems to have
> msleep()-amnesia ;-)
I'm NOT really an expert in brickOS, but these are the sources of delay and
msleep:
void delay(unsigned ms)
{
unsigned i;
while (ms-- > 0)
for (i = 0; i < 600; i++) // not well calibrated.
;
}
//! delay execution allowing other tasks to run.
/*! \param msec sleep duration in milliseconds
\return number of milliseconds left if interrupted, else 0.
*/
unsigned int msleep(unsigned int msec)
{
#if defined(CONF_TIME) && defined(CONF_TM)
if (wait_event(&tm_sleep_wakeup, get_system_up_time() +
MSECS_TO_TICKS(msec)) == 0)
return (MSECS_TO_TICKS(msec) - get_system_up_time());
#else
delay(msec);
#endif
return 0;
}
> msleep() doesn't seem to have any influence on the motor output anymore.
Maybe msleep is exiting later (or sooner?) than expected, you can check its
return value for this event.
Regards, Guido
|
|
Message is in Reply To:
| | Strange BrickOS Timing
|
| Hello out there, maybe someone can explain to me why the current brickOS release seems to have msleep()-amnesia ;-) We've been testing the data transfer to our Lepomux device. For some strange reason we were still using kernel 0.2.6.07nmChg with a (...) (21 years ago, 2-Dec-03, to lugnet.robotics.rcx.legos)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|