Subject:
|
RE: NXC/NBC release news
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Thu, 15 Feb 2007 07:04:34 GMT
|
Reply-To:
|
<DICKSWAN@SBCGLOBAL.NETstopspammers>
|
Viewed:
|
13998 times
|
| |
| |
> David Schilling wrote on Wednesday, February 14, 2007 11:08 PM
>
>
> I would agree. I would prefer versions of the graphics commands that
> didn't include the clear screen flag. The fact that LEGO designed the
> firmware to require the flag with each of these doesn't mean it's
> needed in a high level language.
In addition to the explicit flag on the opcodes, the NXT-G firmware also
does an implicit clear of the screen the first time a user application
program writes to the screen. So the macros could be hard-coded with
'false' and this parameter eliminated.
> Of course what would be nice is if instead if the clearscreen
> parameter there was a possibility of including the *colour* of your
> text, circles, lines, etc. We'd still have four parameters, but instead
> of one of them being useless, it would be very useful. Unfortunately
> LEGO didn't include that in this version of their firmware. We can
> only hope for a future version that includes this!
I'm not sure what you mean by "color"? At one time I hoped that gray
scale display was possible on the LCD but unfortunately the LCD
controller only has a single bit per pixel.
> That's why there isn't a better way to clear out the text, by the way
> -- all the commands only draw in black.
The NXT-G firmware does have routines that will draw a complete line of
text and blank fill the complete textline. And you can even have the
text horizontally centered on the line.
Unfortunately these functions are not explicitly exposed in the NXT-G
opcodes. But they are available if you want to do direct writes to the
display IOMAP fields.
> Though writing text does clear the 6x8 pixel rectangle that a character
> goes into. This is why you need to write a row of spaces before
> overwriting older text. Be thankful that you can do it!
I think one of the reasons that LEGO released the firmware source code
was so that the end users could do these kinds of enhancements? :)
You might want to look at RobotC if you want richer LCD display
capabilities. Among other things it includes:
O Drawing shapes in outline, fill and erase mode. Is this what you meant
by "colors"?
O Optional blank fill the end of a text line.
O Two size of fonts: 6x8 and 12x16.
O An optional mode to provide text scrolling.
O Standard 'C' formatting codes -- similar to C's 'sprintf' function.
O Performance optimized so that low level drawing functions execute five
to ten times faster than with the NXT-G firmware.
|
|
Message is in Reply To:
| | Re: NXC/NBC release news
|
| (...) I would agree. I would prefer versions of the graphics commands that didn't include the clear screen flag. The fact that LEGO designed the firmware to require the flag with each of these doesn't mean it's needed in a high level language. Of (...) (18 years ago, 15-Feb-07, to lugnet.robotics.nxt)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in NXT programmable brick
|
|
|
|