ROBOTC.net forums
http://www.robotc.net/forums/

`#pragma config(...)` documentation?
http://www.robotc.net/forums/viewtopic.php?f=52&t=5916
Page 1 of 1

Author:  Ernest3.14 [ Sat Jun 01, 2013 2:43 pm ]
Post subject:  `#pragma config(...)` documentation?

I can't find any actual documentation for the `#pragma config` statements, which there surely must be. I know that I can use the "Motors and Sensors config" dialog box, but I'm trying to attach sensors that aren't in the dialog boxes (prototype board, etc.). I would also like to know the formatting for the motor config statements as well, so I don't have to open up the dialog box every time something changes (which happens a lot :P ). I've looked in the system headers but couldn't find anything--I'm guessing the stuff is hard-coded? Which also explains why the config statements have to be the very first lines of the code.
Also I dislike automatically-generated code :)

Author:  mightor [ Sun Jun 02, 2013 1:27 am ]
Post subject:  Re: `#pragma config(...)` documentation?

I am not aware of any docs about this stuff, but if you're using unsupported prototyping boards, there's not a whole lot of point to using the pragma stuff anyway. Configure the ports using SetSensorType() in your own config function. The pragma stuff for the motor and sensor setup is for internal use only and not really made for human consumption.

= Xander

Author:  Ernest3.14 [ Sun Jun 02, 2013 1:04 pm ]
Post subject:  Re: `#pragma config(...)` documentation?

Is SetSensorType() still a supported function? It isn't on the RobotC wiki... I do remember it from a while back though. Does `TSensorTypes SensorType[tSensors sensor]` seem right? http://www.robotc.net/wiki/NXT_Function ... SensorType

I can't figure out what to set it to either. There isn't any mention of TSensorTypes anywhere on the wiki or the help files. :(

Author:  mightor [ Sun Jun 02, 2013 1:16 pm ]
Post subject:  Re: `#pragma config(...)` documentation?

I tend to use right click and find declaration :) Here's how to do it:
Attachment:
2013-06-02_19-14-14.png
2013-06-02_19-14-14.png [ 5.28 KiB | Viewed 15249 times ]


Attachment:
2013-06-02_19-14-31.png
2013-06-02_19-14-31.png [ 17.04 KiB | Viewed 15249 times ]


Attachment:
2013-06-02_19-14-42.png
2013-06-02_19-14-42.png [ 13.86 KiB | Viewed 15249 times ]


Tadaaaah!

= Xander

Author:  Ernest3.14 [ Sun Jun 02, 2013 1:18 pm ]
Post subject:  Re: `#pragma config(...)` documentation?

Why thank you! This is going to be really helpful :D

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/