To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1415
1414  |  1416
Subject: 
Re: Program() always returns 0
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Wed, 8 May 2002 05:11:17 GMT
Viewed: 
4152 times
  
I believe any data source (not just timers/sensors/variables) can be
used in SetUserDisplay.  The big limitation is that local variables
cannot be used since the display is updated in a global context
independent of the tasks.

If you know of data sources that do not work, please let me know and
I'll try to have NQC catch those errors.

Dave Baum

In article <GvoB64.HE9@lugnet.com>, "Gustav Jansson" <GJansson@aol.com>
wrote:

SetUserDisplay does not work like that.  You need to specify either a
sensor, timer, or global variable.  Once you have done that it will
continuously update the display as the value changes.  In your case you
should write your program something like:

int ud;   // user display global

task main()
{
  SetUserDisplay(ud, 0);
  ud = Program();
}



Gus



Message is in Reply To:
  Re: Program() always returns 0
 
SetUserDisplay does not work like that. You need to specify either a sensor, timer, or global variable. Once you have done that it will continuously update the display as the value changes. In your case you should write your program something like: (...) (23 years ago, 6-May-02, to lugnet.robotics.rcx.nqc)

4 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