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 / 371
370  |  372
Subject: 
new release???
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 26 Aug 1999 09:49:43 GMT
Viewed: 
962 times
  
Hi,

I've been wondering why there hasn't been put out a newer release than
990330, especially since the rotation sensors doesn't work in it.
But the error was identified way back in April by Mario Ferrari
(http://www.lugnet.com/robotics/rcx/legos/?n=144)

...
#define STATE_0_VALUE (ds_unscale(1023U))
...
#define IN_RANGE( val ) (raw > (val - RANGE_SIZE) && \
                         raw < (val + RANGE_SIZE) )

because you use 16 bit integers IN_RANGE(STATE_0_VALUE) causes an
overflow in (val + RANGE_SIZE), and the statement can never be true.
This error has been around since March, and makes Legos useless if you
need rotation sensors, and don't have the time to track down the error.

We tried a solution posted on this newsgroup and it didn't work for us,
but replacing the 2 occurences of IN_RANGE(STATE_0_VALUE) with
IN_RANGE_STATE_0. which is defined

#define IN_RANGE_STATE_0  (raw > (STATE_0_VALUE - RANGE_SIZE))

(because you don't need the upper bound when testing if it's in range of
state 0) worked. I suggest that somebody makes a release, so everybody
is not fixing the same bugs. Except for the rotation sensors I think
LegOS is a a great OS/library/whatever.

/erik

--
\|/ ____ \|/  Erik M. Hansen
"@'/ oo \`@"  http://www.daimi.au.dk/~martino/
/_| \__/ |_\  "Der er nu 127 dage, 13 timer
    \__U_/      og 32 minutter til år 2000"



1 Message 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