Subject:
|
Re: NXC/NBC release news
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Wed, 14 Feb 2007 11:07:49 GMT
|
Viewed:
|
13689 times
|
| |
| |
Hi John!
I think there is not an urgent need for a clear-screen flag in a
bunch of NXT screen functions. That is, my sources are full of
"false," flags :-)
TextOut(...,true,...);
TextOut(...,false,...);
TextOut(...,false,...);
LineOut(...,false);
LineOut(...,false);
RectOut(...,false);
CircleOut(...,false);
(well, I defined some macros to not to write that "false" dozens of
times) :-)
Also, I don't find any function to clear pixels (no ClearPixel, no
ClearLine, no ClearArea). Currently, in my debugging source, I need
to write a string like "....." before outputting a numerical value
from a sensor (to not to get values like "905" meaning "90" being put
on "105").
Another issue: I am using Mac OS X compiled version. The listing
below does *never* show "1" on the NXT screen (that is, does never
see that the "right/gray" key of the NXT is pressed). If I uncomment
the four lines, I can correctly read "left/gray" key and "enter/
orange" key-pressed status. The bug comes also when I do not use "-
Z2" compiler optimization flag.
#include "NXCDefs.h"
void main()
{
int n,m,l,r,e;
ClearScreen();
for(n=0; n<1000; n++)
{
r=ButtonPressed(UI_BUTTON_RIGHT, false);
// l=ButtonPressed(UI_BUTTON_LEFT, false);
// e=ButtonPressed(UI_BUTTON_ENTER, false);
// NumOut(0, LCD_LINE2, false, l);
// NumOut(20, LCD_LINE2, false, e);
NumOut(40, LCD_LINE2, false, r);
Wait(100);
}
}
Everything above gives same results with b25 and b26 releases.
Thank you for NXC compiler, excellent work.
--
alf ** Italy
|
|
Message has 2 Replies: | | 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)
| | | Re: NXC/NBC release news
|
| (...) I am inclined to agree with you. The NXT firmware system calls provide the flexibility for choosing whether to clear the screen before any screen drawing operation but generally this option is not needed every time. Since I have a ClearScreen (...) (18 years ago, 15-Feb-07, to lugnet.robotics.nxt)
|
Message is in Reply To:
| | NXC/NBC release news
|
| I released beta 26 last night/this morning. It is primarily a bug fix release. If you want to use the new features in beta 25 you definitely should upgrade to beta 26 due to the problems that exist in the previous beta release. - Fixes an array (...) (18 years ago, 12-Feb-07, to lugnet.robotics, lugnet.robotics.nxt)
|
6 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
|
|
|
|