View unanswered posts | View active topics It is currently Sat Aug 23, 2014 4:04 pm






Reply to topic  [ 5 posts ] 
`#pragma config(...)` documentation? 
Author Message
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post `#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 :)

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sat Jun 01, 2013 2:43 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3193
Location: Rotterdam, The Netherlands
Post 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

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sun Jun 02, 2013 1:27 am
Profile WWW
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post 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. :(

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sun Jun 02, 2013 1:04 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3193
Location: Rotterdam, The Netherlands
Post 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 2679 times ]


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


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


Tadaaaah!

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sun Jun 02, 2013 1:16 pm
Profile WWW
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: `#pragma config(...)` documentation?
Why thank you! This is going to be really helpful :D

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sun Jun 02, 2013 1:18 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

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.