1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

wishlist for NXC

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.

Re: wishlist for NXC

Postby doc-helmut » 12 Nov 2012, 10:01

I suggest you never again ask for recursions in NXC

who do you think you are to think you may give me advices?
Better ignore posts which are not addressed to you in future and walk along! (as already suggested by J.H.)
regards,
HaWe
±≠≈αγδεωΔΦΣ∫√∅∞
NXC CHESS for NXT: http://www.mindstormsforum.de/viewtopic.php?f=70&t=6790
indispensable for NXC + EV3-C: easy + trouble-free network & sensor+motor remote control for rs485, BT, USB!
User avatar
doc-helmut
 
Posts: 2424
Joined: 29 Sep 2010, 14:25

Re: wishlist for NXC

Postby afanofosc » 13 Nov 2012, 15:57

Also, it is best to ignore advice from people that you think should not be giving you advice rather than to ask them who they think they are and give them advice that they don't think you should be giving them.

If the firmware supported a function call mechanism that allowed for recursion then maybe I would add support for recursion in NXC.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
User avatar
afanofosc
Site Admin
 
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN

Re: wishlist for NXC

Postby doc-helmut » 17 Nov 2012, 14:54

what about making such fw changes for recursions?
(and, BTW, also for a peer-to-peer-network protocol?)
regards,
HaWe
±≠≈αγδεωΔΦΣ∫√∅∞
NXC CHESS for NXT: http://www.mindstormsforum.de/viewtopic.php?f=70&t=6790
indispensable for NXC + EV3-C: easy + trouble-free network & sensor+motor remote control for rs485, BT, USB!
User avatar
doc-helmut
 
Posts: 2424
Joined: 29 Sep 2010, 14:25

Re: wishlist for NXC

Postby jld001 » 13 Dec 2012, 21:00

http://pastebin.com/Apd8eSD8
I have a program that cycles through a bool array and draws it as rectangles. I would like to be able to clear the false rectangles and fill the true ones. The DRAW_OPT_CLEAR, and DRAW_OPT_INVERT don't work for clearing the false rectangles.
Any ideas? Thanks.
My Githubz of Source Codez, in order of awesomeness:
https://github.com/ArtskydJ/NXC_Source
https://github.com/ArtskydJ/NXC_Tests
My Lego Creations, in no particular order:
LEGO Bop-It - http://www.youtube.com/watch?v=6TsqrBVKbj0
LEGO Safe - http://www.youtube.com/watch?v=MyDRfVquHuY
jld001
 
Posts: 19
Joined: 07 Sep 2012, 21:32

Re: wishlist for NXC

Postby jld001 » 02 Jan 2013, 22:16

I am working on some games, and for the graphics to look best, I want to clear only part of the screen, not the entire screen. (Clearing the entire screen creates flicker.)
I would imagine the code would look something like this:
Code: Select all
RectOut(x,y,w,h,DRAW_OPT_NORMAL);
Wait(1000);
RectOut(x,y,w,h,DRAW_OPT_FILL_INVERT); //No such thing :)

Here are the actual drawing option constants.
Code: Select all
#define  DRAW_OPT_CLEAR_PIXELS (0x0004)
#define  DRAW_OPT_CLEAR             (0x0004)
#define  DRAW_OPT_INVERT            (0x0004)

Clear Pixels, Clear, and Invert don't clear the rectangle specified.
Does anyone know a workaround, or would anyone be interested in this being implemented?
My Githubz of Source Codez, in order of awesomeness:
https://github.com/ArtskydJ/NXC_Source
https://github.com/ArtskydJ/NXC_Tests
My Lego Creations, in no particular order:
LEGO Bop-It - http://www.youtube.com/watch?v=6TsqrBVKbj0
LEGO Safe - http://www.youtube.com/watch?v=MyDRfVquHuY
jld001
 
Posts: 19
Joined: 07 Sep 2012, 21:32

Re: wishlist for NXC

Postby mattallen37 » 02 Jan 2013, 23:51

Use:
Code: Select all
DRAW_OPT_FILL_SHAPE | DRAW_OPT_CLEAR
for the draw options (equals 0x24).

So, it would be like this:
Code: Select all
RectOut(x, y, w, h, (DRAW_OPT_FILL_SHAPE | DRAW_OPT_CLEAR));


or you could #define DRAW_OPT_FILL_INVERT like this:
Code: Select all
#define DRAW_OPT_FILL_INVERT (DRAW_OPT_FILL_SHAPE | DRAW_OPT_CLEAR)
and then you could use:
Code: Select all
RectOut(x, y, w, h, DRAW_OPT_FILL_INVERT);
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
User avatar
mattallen37
 
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA

Re: wishlist for NXC

Postby jld001 » 03 Jan 2013, 18:17

:D Thank you so much, I implemented it and it works great! :D
My Githubz of Source Codez, in order of awesomeness:
https://github.com/ArtskydJ/NXC_Source
https://github.com/ArtskydJ/NXC_Tests
My Lego Creations, in no particular order:
LEGO Bop-It - http://www.youtube.com/watch?v=6TsqrBVKbj0
LEGO Safe - http://www.youtube.com/watch?v=MyDRfVquHuY
jld001
 
Posts: 19
Joined: 07 Sep 2012, 21:32

Re: wishlist for NXC

Postby doc-helmut » 05 Jan 2013, 21:28

currently, TextOut cuts off the rest of a string when the end of a line has been reached.
What about making automatic line breaks (wordwrap, CR/LF) in these cases like on a real text console instead of cutting off the string?
regards,
HaWe
±≠≈αγδεωΔΦΣ∫√∅∞
NXC CHESS for NXT: http://www.mindstormsforum.de/viewtopic.php?f=70&t=6790
indispensable for NXC + EV3-C: easy + trouble-free network & sensor+motor remote control for rs485, BT, USB!
User avatar
doc-helmut
 
Posts: 2424
Joined: 29 Sep 2010, 14:25

Re: wishlist for NXC

Postby afanofosc » 07 Jan 2013, 13:20

I think adding support for text wrapping either automatically at the edge of the screen (with the appropriate text option) and/or support for LF and CR would be great. I can work on that while I wait anxiously for some additional information about the new LEGO MINDSTORMS EV3 and start focusing more on implementing support in BricxCC for native ARM9 Linux executables.

Wired has some cool photos from the LEGO Education version:

Image

Image


From the LEGO Education website: http://www.legoeducation.us/eng/categor ... cation/ev3

The retail set models from Engadget.com: http://www.engadget.com/gallery/lego-mindstorms-ev3/

http://www.engadget.com/2013/01/07/lego ... bile-apps/

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
User avatar
afanofosc
Site Admin
 
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN

Re: wishlist for NXC

Postby doc-helmut » 07 Jan 2013, 13:34

yes, that would be great.
Also different unfulfilled wishes for NXC (like e.g., for making real superscaled-parallelized-NXT-IO-control, pointers, recursions, stack, heap, dynamic memory allocation, stdio.h lib, and all based on a real ANSI C compiler for genuine ARM machine code like e.g., based on gnu for arm/Linux) instead of that awfully slow and straitened Lego firmware will now hopefully be history by then...
(conditional when again provided by a proven J.H. API)

8-)
regards,
HaWe
±≠≈αγδεωΔΦΣ∫√∅∞
NXC CHESS for NXT: http://www.mindstormsforum.de/viewtopic.php?f=70&t=6790
indispensable for NXC + EV3-C: easy + trouble-free network & sensor+motor remote control for rs485, BT, USB!
User avatar
doc-helmut
 
Posts: 2424
Joined: 29 Sep 2010, 14:25

PreviousNext

Return to Mindstorms Software

Who is online

Users browsing this forum: No registered users and 1 guest