Bricxcc and firmware test versions
Re: Bricxcc and firmware test versions
Am I the only one who hates registry entries? To me it's tortures down to the bones.
How I would love to have the former .ini files of the good old days of Win95/98 which you could edit with any text editor.
How I would love to have the former .ini files of the good old days of Win95/98 which you could edit with any text editor.
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Bricxcc and firmware test versions
It worked! I changed the value to 1, and that seems to have done it. Thanks a lot for all your help!
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 358
- Joined: 01 Oct 2010, 06:37
- Location: Denmark
- Contact:
Re: Bricxcc and firmware test versions
(Thanks for the zip.)afanofosc wrote:The thing (or one of the things) I found confusing was that calling ArrayInit(data, 10, 1000) on a byte array that was previously empty did not result in the PoolSize going up by ~1000 and when I copied it to another byte array that was previously empty it didn't go up further.
I tried raising a byte array slowly and got the following data:
Code: Select all
PoolSize Dataspace
0 204 108
1 205 109
2 206 110
3 207 111
5 209 113
10 214 118
15 219 123
20 224 128
25 229 133
50 254 158
51 255 159
52 0 160
I was using the following piece of code for the testing:
Code: Select all
//test2.nxc
task main(){
byte test_array[];
ArrayInit(test_array, 0, 143);
int ps, ds;
GetMemoryInfo(true, ps, ds);
TextOut(100, LCD_LINE1, test_array);
NumOut(0, LCD_LINE1, ps);
NumOut(0, LCD_LINE2, ds);
Wait(6000);
}
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
Re: Bricxcc and firmware test versions
There was a bug in the implementation of the MemoryManager system call. I have fixed that and uploaded a new test version of the firmware image here:
http://sourceforge.net/projects/bricxcc ... p/download
The numbers definitely look more reasonable now.
John Hansen
http://sourceforge.net/projects/bricxcc ... p/download
The numbers definitely look more reasonable now.
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: Bricxcc and firmware test versions
Can you post a version of the firmware without try me and nxt datalog menus?
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
Re: Bricxcc and firmware test versions
Using a void like this doesn't work anymore.
It doesn't make the point move diagonal.
Code: Select all
int x;
int y;
void Jump(int & sx, int & sy)
{
sx++;
sy++;
}
task t1()
{
while(1)
{
PointOut(x,y);
Wait(50);
}
}
task t2()
{
while(1)
{
Jump(x,y);
}
}
task main()
{
Precedes(t1,t2);
}
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
Re: Bricxcc and firmware test versions
Can you point me to a firmware version where your code did produce a diagonally moving point? There have been no recent changes to the drawing operations in the enhanced NBC/NXC firmware. The second task should execute Jump many times more frequently than the PointOut call is executed in the first task. The word "void" is not a proper term for a function or procedure. Just refer to it as a function or a procedure.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: Bricxcc and firmware test versions
The firmware is the most recent version. The PointOut works, but using the int & sx doesn't work. It compiles, but doesn't write the variable x to the value of sx.
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
Re: Bricxcc and firmware test versions
I'm not seeing the same results you are with the latest BricxCC and firmware test versions (which this thread is about).
In 50 milliseconds, i.e., before PointOut draws its second point, the x and y values have been incremented way beyond 63, 63 which would be the last visible dot as x and y are incremented upwards. Try this program:
As you can see, x and y are incremented and the dots are drawn diagonally upward from (0, 0).
John Hansen
In 50 milliseconds, i.e., before PointOut draws its second point, the x and y values have been incremented way beyond 63, 63 which would be the last visible dot as x and y are incremented upwards. Try this program:
Code: Select all
int x=0;
int y=0;
void Jump(int & sx, int & sy)
{
sx++;
sy++;
}
task t1()
{
while(1)
{
PointOut(x,y);
Wait(500);
}
}
task t2()
{
while(1)
{
Jump(x,y);
NumOut(0, LCD_LINE8, x);
NumOut(50, LCD_LINE8, y);
Wait(500);
}
}
task main()
{
Precedes(t1,t2);
}
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: Bricxcc and firmware test versions
But this only returns x and y at the end of the function.
Code: Select all
int x=0;
int y=0;
void Jump(int & sx, int & sy)
{
repeat(5)
{
sx++;
sy++;
}
}
task t1()
{
while(1)
{
PointOut(x,y);
Wait(500);
}
}
task t2()
{
while(1)
{
Jump(x,y);
NumOut(0, LCD_LINE8, x);
NumOut(50, LCD_LINE8, y);
Wait(500);
}
}
task main()
{
Precedes(t1,t2);
}
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
Who is online
Users browsing this forum: No registered users and 2 guests