Subject:
|
Re: Blocking SetUserDisplay?
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Sat, 11 Jun 2005 12:04:57 GMT
|
Viewed:
|
5496 times
|
| |
| |
"Ross Crawford" <ross.{mylastname}@gmail.com> writes:
>
> 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?
In C you would declare a as volatile.
Jürgen
--
NO to software patents -- stop the European patents directive
Jürgen Stuber <juergen@jstuber.net>
http://www.jstuber.net/
gnupg key fingerprint = 2767 CA3C 5680 58BA 9A91 23D9 BED6 9A7A AF9E 68B4
|
|
Message is in Reply To:
| | Blocking SetUserDisplay?
|
| 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 (...) (19 years ago, 4-Jun-05, to lugnet.robotics.rcx.nqc)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|