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 / 1749
1748  |  1750
Subject: 
Re: Swan Firmware
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Mon, 7 Feb 2005 04:43:35 GMT
Viewed: 
6541 times
  
In lugnet.robotics.rcx.nqc, Iain Hendry wrote:
Um.  I have no idea what an API is :-/

Application Programming Interface

http://www.cnet.com/Resources/Info/Glossary/Terms/api.html

Oh my god.  I'm completly lost :(

Sorry.

#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??

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 three such items.  You can use MSTimer(n) where n is 0 through 3 much like
how you can use Timer(n) or FastTimer(n).  The built-in API simply makes these
functions available to you without requiring you to write low level NQC code.

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

What brick type do you have selected?  The status bar at the bottom of the main
BricxCC window should say Swan if you picked Swan at the Searching for the Brick
dialog.  If you picked Swan and it says Swan on the status bar then you do not
have a recent copy of the swan_test.zip file.  One of the first copies of NQC
with support for the Swan firmware had a bug in the built-in firmware which made
it so that a few API functions were not correctly defined when the Swan firmware
type was selected.  You should, in this case, download the current version of
swan_test.zip off my BricxCC website
(http://bricxcc.sourceforge.net/swan_test.zip).  I'm working on a new official
release that should be out this month, with any luck.

John Hansen



Message has 1 Reply:
  Re: Swan Firmware
 
(...) No no, don't be. It's my own stupidity/ignorance in progrmaming terms. I'm slowly learning. (...) Good stuff, John. Thank you for your work on this, it's unbeliveable. I got it to do what I need. Now, the only problem is it doesn't seem to (...) (20 years ago, 9-Feb-05, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: Swan Firmware
 
(...) Um. I have no idea what an API is :-/ (...) Oh my god. I'm completly lost :( (...) Whaaa?? (...) 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 (...) (20 years ago, 7-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