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 / 1748
1747  |  1749
Subject: 
Re: Swan Firmware
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Mon, 7 Feb 2005 04:20:31 GMT
Viewed: 
6314 times
  
"John Hansen" <afanofosc@comcast.net> wrote:

Having downloaded a copy of swan_test.zip which contains the latest test
release
of BricxCC and NQC you can use nearly all the new and enhanced features in
the
Swan firmware.  You can view the "official" API built into NQC by
executing the
following command line:

Um.  I have no idea what an API is :-/

This file can be loaded into BricxCC and you can use the Procedure List
and the
Code Explorer to browse through the file looking at all the various
constants
and functions.  Most of the new Swan API is near the very end of the file
within
a #if defined(__SWAN) section.

Oh my god.  I'm completly lost :(

#define MSTimer(n) @(0x160000 + (n))
__nolist void ResetMSTimer(const int n) { Set(MSTimer(n), 0); }

__nolist void WaitMS(const int &v) { asm { 0x47, $v : __ASM_SRC_EXT}; }

Whaaa??

So if you want to use the 10 millisecond wait you use Wait(n) and if you
want to
use the 1 millisecond wait you use WaitMS(n).  If you want to read the
10ms
timer you use FastTimer(n).  If you want to read the 100ms timer you use
Timer(n).  If you want to read the 1ms timer you use MSTimer(n).

task main()
{
int x = 1;
for (x = 0; x < 100; x++)
{
   SetUserDisplay(x, DISPLAY_USER);
   WaitMS(1000);
}
}

This short program will update the display with the value of variable x
one time
each second.

When I copy/paste that into BricxCC, I get an when I hit the
Compile/download button:  Undefined function: "SetUserDisplay"...??

I think I'm going to cry.  I am so dumb :(

    Iain



Message has 1 Reply:
  Re: Swan Firmware
 
(...) Application Programming Interface (URL) Oh my god. I'm completly lost :( Sorry. (...) I'm not sure what you are confused about. The API defines a series of values and functions which you can use in your NQC programs. The three lines above show (...) (20 years ago, 7-Feb-05, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: Swan Firmware
 
(...) Having downloaded a copy of swan_test.zip which contains the latest test release of BricxCC and NQC you can use nearly all the new and enhanced features in the Swan firmware. You can view the "official" API built into NQC by executing the (...) (20 years ago, 6-Feb-05, to lugnet.robotics.rcx.nqc)

23 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