Search found 10 matches

by ejvaughan
04 Jan 2012, 17:49
Forum: Mindstorms Software
Topic: SetOutputState direct command turn ratio not working
Replies: 3
Views: 4152

SetOutputState direct command turn ratio not working

Hey guys. I have a question about the turn ratio parameter for the SetOutputState direct command. I understand what it is supposed to do--that is, set the speed of a motor relative to the speed of the motor to which it is synchronized--but it does not seem to be working for me. Here is my code (Obje...
by ejvaughan
27 Jun 2011, 01:33
Forum: Mindstorms Software
Topic: Memory management of NXC strcat
Replies: 17
Views: 16242

Re: Memory management of NXC strcat

The very latest Fantom drivers for Mac OS X might help you, if you do not already have them installed. LEGO released an update that was intended to help improve support for the new bluetooth hardware used in newer Mac computers. http://cache.lego.com/upload/contentTemplating/Mindstorms2SupportFiles...
by ejvaughan
24 Jun 2011, 20:41
Forum: Mindstorms Software
Topic: Memory management of NXC strcat
Replies: 17
Views: 16242

Re: Memory management of NXC strcat

Make sure you are using the very latest BricxCC/NBC/NXC version. There was a bug with uninitialized strings that I have fixed recently and that may not be available in any publicly available version at this time. All your strings need to be null terminated or strcat will fail - possibly crashing yo...
by ejvaughan
23 Jun 2011, 02:52
Forum: Mindstorms Software
Topic: Memory management of NXC strcat
Replies: 17
Views: 16242

Re: Memory management of NXC strcat

You should use strlen() instead of the deprecated StrLen() . Same with SubStr() . Try it with: arrinit tmp, 0, 1 Where does it freeze? The last block? I tried your suggestion, but it still fails at some point during the last block. And the reason I know it has something to do with Mr. Hansen's code...
by ejvaughan
23 Jun 2011, 02:26
Forum: Mindstorms Software
Topic: Memory management of NXC strcat
Replies: 17
Views: 16242

Re: Memory management of NXC strcat

In the OP's case he has something like this: task main() { string large_buffer, tmp; string new_data; // read data from bluetooth //append it to large_buffer asm { strcat tmp, large_buffer, new_data mov large_buffer, tmp arrinit tmp, 0, 0 } } So he has to have a third buffer to store the results of...
by ejvaughan
18 Jun 2011, 18:44
Forum: Mindstorms Software
Topic: Memory management of NXC strcat
Replies: 17
Views: 16242

Memory management of NXC strcat

How exactly does strcat manage memory in NXC? I'm writing a program to receive packets of data over Bluetooth from a computer, and I'm simply concatenating each new packet that comes in to a single string. The problem is that the program crashes after the string's length exceeds a little over 6000. ...
by ejvaughan
18 Jun 2011, 01:38
Forum: Mindstorms Software
Topic: NXC SendMessage returning -19
Replies: 2
Views: 3620

Re: NXC SendMessage returning -19

Could we see your code? (A simplified version would be nice. About 10-20 lines, if you can.) I don't see anything here . EDIT: There's a -19 here . Apparently, you specified something with an ERR_INVALID_SIZE . Muntoo, you are exactly right! I was trying to send a text string that was one character...
by ejvaughan
18 Jun 2011, 00:30
Forum: Mindstorms Software
Topic: NXC SendMessage returning -19
Replies: 2
Views: 3620

NXC SendMessage returning -19

What does a return value of -19 from the NXC API SendMessage mean? I'm stumped.
by ejvaughan
13 Jun 2011, 22:22
Forum: Site Comments/Complaints/Suggestions
Topic: NXText NXC?
Replies: 14
Views: 15706

Re: NXText NXC?

NXText NXC was a text writing program, not a messaging program. Actually, NXText is not a text editor. It cannot create or edit text files. Instead, it is a text file viewer and manager. Hopefully this clears up any confusion. ;) But anyway, the source code for NXText is attached below. You are fre...
by ejvaughan
13 Jun 2011, 02:46
Forum: Site Comments/Complaints/Suggestions
Topic: NXText NXC?
Replies: 14
Views: 15706

Re: NXText NXC?

Surprise, surprise! I'm back! (For what length of time I know not.) lol. I feel kind of famous right now. Anyway, I believe I still have the code for NXText hidden somewhere on my computer. If you have not already obtained a copy, I would gladly dig it up for you. ;)