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 / 590
589  |  591
Subject: 
Re: NQC 2.2 a1 available for public test
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sun, 7 May 2000 22:17:41 GMT
Reply-To: 
rkra@gmx#Spamless#.de
Viewed: 
1605 times
  
Hi,

oh I did a another mistake. I 've sent the wrong file. And I tried to
send it via attachment .... with no chance ...

I 'm sorry. This version is a silly one.
I 'm setting a variable but don't use it in the display command.
This is purely the same sample like #1 and not a new sample.

i = 100;                         // #5  works also with variables
Display (100, 0);                //     displays 100 as #1 did
PlaySound (SOUND_CLICK);
Wait (100);


In my sample #5 the display should show the variable i, so the code must be

i = 100;                         // #5  works also with variables
Display (i, 0);                  //     displays 100 as #1 did
PlaySound (SOUND_CLICK);
Wait (100);

So please have a look to test1b.nqc.
I hope it 's okay now.

Ralf

// -------------------------------------------------------------------------------------
//
// test1.nqc
//
// by
// Ralf Krause <rkra@gmx.de>
//
// for
// nqc-mpw-2.2.a1 or nqc-win-2.2.a1
//
// ---------------------------------------
//
// To use the new rcx22 api you have to
// download this file with the parameters
//
// nqc -Trcx2 -d test1.nqc
//
// ---------------------------------------



// Turn off the RCX
// I can't find this in the rcx22 api
void SleepNow()   { asm { 0x60 }; }  // switch off immediately



int i;


task main() {

PlaySound (SOUND_UP);
Wait (100);

SetUserDisplay (100, 0);         // #1  displays 100
SelectDisplay (DISPLAY_USER);
PlaySound (SOUND_CLICK);
Wait (100);

SetUserDisplay (200, 1);         // #2 displays 20.0
SelectDisplay (DISPLAY_USER);
PlaySound (SOUND_CLICK);
Wait (100);

SetUserDisplay (300, 2);         // #3  displays 3.00
SelectDisplay (DISPLAY_USER);
PlaySound (SOUND_CLICK);
Wait (100);

SetUserDisplay (400, 3);         // #4  displays 0.400
SelectDisplay (DISPLAY_USER);
PlaySound (SOUND_CLICK);
Wait (100);

i = 100;                         // #5  works also with variables
Display (i, 0);                  //     displays 100 as #1 did
PlaySound (SOUND_CLICK);
Wait (100);

i += 100;
Display (i, 1);                  // #6  displays 20.0 as #2 did
PlaySound (SOUND_CLICK);
Wait (100);

i += 100;
Display (i, 2);                  // #7  displays 3.00 as #3 did
PlaySound (SOUND_CLICK);
Wait (100);

i += 100;
Display (i, 3);                  // #8  displays 0.400 as #4 did
PlaySound (SOUND_CLICK);
Wait (100);

Display (BatteryLevel(), 3);     // #9 displays the battery level (in Volts)
PlaySound (SOUND_CLICK);
Wait (100);

Display (Program(), 0);          // #10 should show one less than the
prgm number
PlaySound (SOUND_CLICK);
Wait (100);

Display (FirmwareVersion(), 2);  // #11 should show 3.26 if you are
using firm0326.lgo
PlaySound (SOUND_CLICK);
Wait (100);

SelectDisplay(DISPLAY_WATCH);    // #12 should show the current time
Wait (20);
PlaySound (SOUND_CLICK);
Wait (100);

SetWatch (12, 34);               // #13 sets watch to 12.34
// SelectDisplay(DISPLAY_WATCH);    // watch is already shown
PlaySound (SOUND_CLICK);
Wait(100);

PlaySound (SOUND_DOWN);
SleepNow ();
}

// -------------------------------------------------------------------------------------

Dave Baum wrote:

Preliminary NQC support for RCX 2.0 is now available in NQC version
2.2a1.  Its in the beta test area of the NQC site:
http://www.enteract.com/~dbaum/nqc

There have been a lot of changes internal to the compiler itself, and
RCX 2.0 support is only partially complete at the moment, but I figured
an early release would be better than nothing.

Dave Baum

--
reply to: dbaum at enteract dot com

--

-------------------------------------------------
Ralf Krause
Bertha-von-Suttner-Gesamtschule Dormagen
Marie-Schlei-Strasse 6
41542 Dormagen
Germany

http://www.bvsdormagen.de
mailto:rkra@gmx.de
-------------------------------------------------



Message has 1 Reply:
  Re: NQC 2.2 a1 available for public test
 
(...) I'm a bit confused...is there a bug I'm supposed to be looking at, or are you posting the code just as an example of using the display. If the former, could you let me know what you expected and what actually happened? Dave Baum p.s. No need (...) (24 years ago, 8-May-00, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  NQC 2.2 a1 available for public test
 
Preliminary NQC support for RCX 2.0 is now available in NQC version 2.2a1. Its in the beta test area of the NQC site: (URL) have been a lot of changes internal to the compiler itself, and RCX 2.0 support is only partially complete at the moment, but (...) (24 years ago, 6-May-00, to lugnet.robotics.rcx.nqc) ! 

22 Messages in This Thread:









Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR