[NXC] Drawing options

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
xdfbeini
Posts: 2
Joined: 13 Oct 2011, 16:11

[NXC] Drawing options

Post by xdfbeini »

Hi,

Trying to run code like

Code: Select all

task main()
{
  RectOut(0, 0, 100, 64, DRAW_OPT_FILL_SHAPE);
}
but it only draws a regular non-filled rectangle. I have also tried using other options like DRAW_OPT_CLEAR etc. but none of them seem to work.

The NXT is running 1.05 firmware (no possibility of updating). I didn't see any mentions that these would require the enhanced firmware, but is this the case?
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: [NXC] Drawing options

Post by mattallen37 »

I run enhanced FW, and I have never had that problem. Why is it impossible to upgrade the FW?
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
spillerrec
Posts: 358
Joined: 01 Oct 2010, 06:37
Location: Denmark
Contact:

Re: [NXC] Drawing options

Post by spillerrec »

Almost all drawing options are Enhanced Firmware only. I think "DRAW_OPT_CLEAR_WHOLE_SCREEN" and "DRAW_OPT_CLEAR_EXCEPT_STATUS_SCREEN" works with the standard firmware, but I'm not sure.
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
xdfbeini
Posts: 2
Joined: 13 Oct 2011, 16:11

Re: [NXC] Drawing options

Post by xdfbeini »

spillerrec wrote:Almost all drawing options are Enhanced Firmware only. I think "DRAW_OPT_CLEAR_WHOLE_SCREEN" and "DRAW_OPT_CLEAR_EXCEPT_STATUS_SCREEN" works with the standard firmware, but I'm not sure.
Thanks, this was the answer I was looking for. Just didn't see any warnings when reading the API like it has under functions which are not compatible with the standard FW.
I run enhanced FW, and I have never had that problem. Why is it impossible to upgrade the FW?
We just don't have the rights to do so as students. And our team is just more comfortable using NXC vs. NXT-G, that's why we are using it on standard FW. We might get the chance later on when we have bigger projects.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: [NXC] Drawing options

Post by mattallen37 »

xdfbeini wrote:...our team is just more comfortable using NXC vs. NXT-G, that's why we are using it on standard FW...
EFW (enhanced firmware) is for NXC. In fact, I don't know that NXT-G would even benefit from using EFW. If your team prefers NXC, then by all means I suggest you upgrade the FW on all the bricks.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: [NXC] Drawing options

Post by mightor »

Well, the benefit of using EFW with NXT-G is that some bugs are fixed. The extra functionality is inaccessible, though.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
timpattinson
Posts: 224
Joined: 30 Oct 2010, 04:10
Location: 127.0.0.1
Contact:

Re: [NXC] Drawing options

Post by timpattinson »

mightor wrote:The extra functionality is inaccessible, though.

- Xander
Extra RS-485 speeds?
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
spillerrec
Posts: 358
Joined: 01 Oct 2010, 06:37
Location: Denmark
Contact:

Re: [NXC] Drawing options

Post by spillerrec »

There are a lot of extra functions in the Enhanced Firmware when you are using it together with NXC. Not just the extra drawing options (and commands), but also extra mathematics like cos() and sin() and much much more.

However at least updating to the current standard firmware would be a good idea. The 1.2x firmware gave a great boost in speed even for old programs, so there is not much point in not updating it.
If you try to talk to your teachers about it I don't think it will be that hard to get permission though.
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests