Subject:
|
Blocking SetUserDisplay?
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Sat, 4 Jun 2005 21:06:36 GMT
|
Viewed:
|
5293 times
|
| |
| |
I have a program with a setup routine for calibrating light sensors. During the
setup routine, it does:
SetUserDisplay (a, 2);
Then in a loop, reads the values of 2 light sensors into x & y, averages the
readings and then does:
a = x * 100 + y;
to display them. This mostly works, but occasionally displays x or x * 100, I'm
assuming the intermediate calculations are actually being stored in the variable
a, and the display doesn't know so displays whatever is there.
I can work around it by doing:
b = x * 100 + y;
a = b;
but I was wondering if there's any other way to either force NQC to use
temporary space for calculations, or force the display routine to block until
the calculations are complete?
Or is this something that is governed by the firmware?
ROSCO
|
|
Message has 3 Replies:
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|