Page 2 of 5

Re: New BricxCC and NBC/NXC release

Posted: 15 Mar 2011, 21:38
by afanofosc
The only thing I changed was NXCDefs.h and NXTDefs.h and rebuilt the compiler for all platforms and BricxCC for Windows and the installer package. There were no changes to the templates in the repost of this release.

John Hansen

Re: New BricxCC and NBC/NXC release

Posted: 15 Mar 2011, 21:42
by afanofosc
doc-helmut wrote:maybe you wish to try this test:

Code: Select all

task main(){

float  x = atof( "4.2e1is_the_answer" );
  NumOut(0,0,x);
  while (true);
}
;)
Are you saying that the behavior with this release is a regression? It is producing the correct value (42) in my testing.

John Hansen

Re: New BricxCC and NBC/NXC release

Posted: 15 Mar 2011, 21:47
by mattallen37
Okay, thanks. I didn't figure so, but I also didn't want to be missing one or two templates.

Thanks a bunch for all the new features :D Now, I just need to try them all ;)

Re: New BricxCC and NBC/NXC release

Posted: 15 Mar 2011, 22:01
by HaWe
afanofosc wrote:
doc-helmut wrote:maybe you wish to try this test:

Code: Select all

task main(){

  float  x = atof( "4.2e1is_the_answer" );
  NumOut(0,0,x);
  while (true);
}
;)
Are you saying that the behavior with this release is a regression? It is producing the correct value (42) in my testing.

John Hansen
no it's all fine, all is working correctly as I expected with this test code (just for mattallen because his compiling didn't work - although mine did it)

only 1 thing I'm missing: the tetrix drivers :(

Re: New BricxCC and NBC/NXC release

Posted: 15 Mar 2011, 23:27
by mattallen37
What are the valid numbers you can pass into "PosRegSetMax (, , );"? I know the first byte is to set the motor ports (for example, OUT_A). The second is for speed, and the third is for acceleration. What are the valid parameters for these? Is speed 0-100? 0-255? 1-n? Thanks

Re: New BricxCC and NBC/NXC release

Posted: 15 Mar 2011, 23:35
by mattallen37
doc-helmut wrote:...just for mattallen because his compiling didn't work - although mine did it...
It does compile now that I have the new release :)

Re: New BricxCC and NBC/NXC release

Posted: 16 Mar 2011, 01:26
by afanofosc
Sadly, I am not an expert on the new PosReg stuff. The default values are

Code: Select all

#define DEFAULT_MAX_SPEED        80
#define DEFAULT_MAX_ACCELERATION 20
0 means no limit. The default regulation time is 100ms rather than 10ms. There was quite a bit of oscillation at the regulated position with 100ms as the regulation time. If I changed it to 10ms it stopped very smoothly at the new position.

John Hansen

Re: New BricxCC and NBC/NXC release

Posted: 16 Mar 2011, 01:32
by nxtreme
Wow, I may just have to download BricxCC and start learning NXC! As has probably been obvious from my lack of posts the last while, I've been busy. But, it will happen sometime :P (yes Matt, it will happen). Thank you for your continued support of the Mindstorms community, Mr. Hansen. It's people like you that make this hobby worthwhile!

Re: New BricxCC and NBC/NXC release

Posted: 16 Mar 2011, 01:37
by mattallen37
Ok. Previously, I always used 0,0 (no limits).

As far as the regulation time, how do I adjust that? I see these functions:

Code: Select all

MotorRegulationTime()
MotorRegulationOptions()
I assume these have to do with it, but I am not sure how to use them.

Re: New BricxCC and NBC/NXC release

Posted: 16 Mar 2011, 01:49
by mattallen37
nxtreme wrote:Wow, I may just have to download BricxCC and start learning NXC! As has probably been obvious from my lack of posts the last while, I've been busy. But, it will happen sometime :P (yes Matt, it will happen). Thank you for your continued support of the Mindstorms community, Mr. Hansen. It's people like you that make this hobby worthwhile!
Yes, you MUST :lol:

I agree, Thank you very much John!