View unanswered posts | View active topics It is currently Fri Aug 01, 2014 9:57 am






Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
ROBOTC for Mindstorms - 1.17 BETA - 3/2/08 
Author Message
Rookie

Joined: Mon Oct 29, 2007 4:25 pm
Posts: 7
Location: Potsdam, Germany
Post Missing features in 1.17
I just installed 1.17. The compiler seems not to know variables like nMotorEncoder any more. These variables also do not show at the help window. Did I miss something in the change log? I have 1.10 in parallel, there I have the variables and the corresponding help entries.

Is this a bug or a feature? If it is a feature, where is it documented?

Best regards, Martin Kraska


Sat Mar 15, 2008 6:52 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post 
THis is working fine for me although I'm using the next development version of ROBOTC.

I think what's likely happened is that there are a couple of version sof 1.17 floating around. The first version set the deafult "platform type" to "RCX" when it previously was "NXT". The second version was not upissued but simply fixed this bug.

Once you select the platform type to "NXT" ROBOTC will store this in registry and you're OK. Platform type selection is found in the "ROBOT" menu.

Sorry about that.


Sat Mar 15, 2008 10:11 pm
Profile
Rookie

Joined: Mon Oct 29, 2007 4:25 pm
Posts: 7
Location: Potsdam, Germany
Post Platform settings in registry, Build ID
Dick, thank you for the reply.

OK, that seems to be the source of the problem. After switching to NXT platform type, the code compiles and (only then) the help entries are enriched.

However, writing this to the registry fails.

I found no obvious menu item like "write to registry". "Delete all entries" seems a bit inappropriate, thus I didn't try.

Connection to the robot (including the remote screen) work even without updating the firmware. However, even making the connection to the brick does not make the settings permanent.

I understand that beta testing has the inherent feature of quickly changing builds in the download area. This is at least an indication of vivid software maintenance and development ;-)

For the testers as well as for the developers build IDs would perhaps simplify the communication. I would not mind being confronted with a more detailed change log including the bug fixes. I admit that this might be confusing to some users, thus it could be optional. May be it is already there and I forgot how to access the information.

Martin Kraska


Sun Mar 16, 2008 5:39 am
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post Re: Platform settings in registry, Build ID
MK wrote:
However, writing this to the registry fails.

What do you mean by this? Was there a "Windows" error message or just a suspicion on your part?

The
MK wrote:
I would not mind being confronted with a more detailed change log including the bug fixes.

The "What's New" command on the help menu gives an abvreviated change log. You're right, it could be a bit more detailed; I'll try to improve in the future. The challenge is to give all the info without getting too detailed.

Also try re-installing the latest version of ROBOTC. THe original 1.17 version didn't properly write the platform type changes to the registry.


Sun Mar 16, 2008 4:22 pm
Profile
Rookie

Joined: Mon Oct 29, 2007 4:25 pm
Posts: 7
Location: Potsdam, Germany
Post 
Dick,

I downloaded the version yesterday and reinstalled after deleting the old 1.17 version in order not to give feedback on obsolete versions.

Sorry for being unspecific. There is no particular error message, RobotC just silently forgets my platform setting, even if I establish a BT session with the brick. I just learnt from an earlier post that the platform info is stored in the registry.

I suffer from not being a C programmer and observed from other discussions that I have to test the availability of any feature that I would like to rely on in my progs. I have extensive experience in fortran, python and matlab, but still have no clue, how efficiently to use the enum datatype and where to guess the predefined options one can choose.

Can you recommend some sort of quick reference with coverage of all supported language elements?


Mon Mar 17, 2008 2:34 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post 
MK wrote:
I suffer from not being a C programmer and observed from other discussions that I have to test the availability of any feature that I would like to rely on in my progs.

Testinf for the presense of features and funcitons is really not the intent. The intent is that ROBOTC programs with same functionality are (nearly) identical on all different platforms that it supports.

In practice, this is not always true. For example, the NXT has a really nice LCD and there's a whole library of functions for the NXT version for drawing to the LCD that will give compile errors (undefined variable) on other platforms.

But the "basic" functionality is the same across platforms. Program structure, arithmetic variables, sensor and motor control etc. So this code is 100% portable.

If you only have a "NXT" robot kit you might want to add the following line to every one of your programs "#pragma platform(NXT)". When the compiler encounters this statement, it will generate an error of the environment is set to another platform.

On the smaller non-NXT platforms, the larger variable types (32-bit int or long, float variables) are real-time calculation intensive because the basic CPU is only 8-bits and software "emulation" is used for the larger variable types. This means they take more time to execute. The NXT has a 32-bit native CPU -- an ARM7 chip -- and there is not a real time penalty for using 32-bit variables in your program.

In addition, the NXT has far more memory than other platforms so running out of memory for variables is an issue only for the very largest programs. Whereas the smallest system limits all variables to fit in 256 bytes (a hardware restriction in the CPU) so that you might want to use "byte" or "char" variables to save space.

I'm not sure what you meant about the "enum datatype". Can you elaborate on this question? "enum" is quite a useful C feature that allows you to assign alphaumeric names to constants rather than using numeric value; for example, instead of using numeric values 0 to 20 to represent various types of sensors on the NXT, they can be referred to by names like sensorTouch, sensorSONAR, etc.


Mon Mar 17, 2008 5:39 pm
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post 
Dick Swan wrote:
MK wrote:
In practice, this is not always true. For example, the NXT has a really nice LCD and there's a whole library of functions for the NXT version for drawing to the LCD that will give compile errors (undefined variable) on other platforms..


Dick,
plz recall ANSI C got I/O routines that work quit similar on EVERY platform, e.g. stdin, stdout, print , printf,...

if RobotC was related to these standards, there were no problems in case of file transfer to other platforms...

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Tue Mar 18, 2008 3:06 am
Profile
Rookie

Joined: Sun Jul 22, 2007 6:32 pm
Posts: 16
Location: Ireland
Post Running 1.17 for last two weeks - seems stable
I've been running the 1.17 beta since it was announced and so far no problems. I did a clean uninstall and reinstall over 1.10 and both USB and Bluetooth communications are working to the NXT.

However I cannot use both NXT-G and RobotC on the RobotC firmware included in the 1.17 beta; NXT-G does not detect it as valid firmware.

Regards,
Mark


Thu Apr 10, 2008 9:47 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post 
Hi Mark,

RobotC and NXG use different firmware, the programs will not work on the others firmware. There has been talk of merging the firmware in the future, we will see :-)

Scott

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Thu Apr 10, 2008 3:31 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 24 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.