Subject:
|
Re: Extending the firmware through DrawGraphic()
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Wed, 21 Feb 2007 15:44:46 GMT
|
Viewed:
|
13636 times
|
| |
| |
In lugnet.robotics.nxt, Jason J Railton wrote:
> Having made an earlier suggestion about using file names to extend the
> capabilities, I've looked into it a little further and found something very
> useful.
>
> The 'NXTDrawPicture', or 'DrawGraphic' command can take an arbitrary array of
> variables. The explanation from LEGO hints at various versions of the RIC file
> format that can hold extra capabilites. These variables would work with these
> extra features. But at the moment they go unused.
These variables do get used by the existing RIC format. I could tell you what
they mean but then I'd have to kill you. :-) It definitely is not a good idea
to try to use them for something completely different.
It seems better to just add a new system call. For example, if you wanted to
have access to the low level Display module drawing functions you could add a
system call for that. Maybe call it "DrawFunction". Have it take a new
structure (TDrawFunction) which can have whatever members you need for this new
system call. Perhaps just an array of signed dwords and a function identifier
where the array holds the arguments that you want to pass to the specified
function. This would let you execute the low level Display module drawing
functions directly. Then you could add low level functions to the Display
module and define new function identifiers as needed.
An RIC file is a graphic program. It contains a series of drawing opcodes.
When you call the DrawGraphic system call it executes all of the opcodes in the
RIC file in sequence. Trying to jury-rig that file format to let you only
execute a subset of the drawing commands inside the RIC does not sound like a
good idea to me.
John Hansen
|
|
Message has 1 Reply: | | Re: Extending the firmware through DrawGraphic()
|
| (...) Yikes - I had no idea it was that convoluted! I want to put on some new graphics functions but I think I'll devise my own file format for those. I'll see if it's possible to hijack DrawGraphic to test it at least, but supporting new opcodes (...) (18 years ago, 21-Feb-07, to lugnet.robotics.nxt)
|
Message is in Reply To:
| | Extending the firmware through DrawGraphic()
|
| Having made an earlier suggestion about using file names to extend the capabilities, I've looked into it a little further and found something very useful. The 'NXTDrawPicture', or 'DrawGraphic' command can take an arbitrary array of variables. The (...) (18 years ago, 21-Feb-07, to lugnet.robotics.nxt)
|
7 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
|
|
|
Active threads in NXT programmable brick
|
|
|
|