View unanswered posts | View active topics It is currently Wed Oct 28, 2020 10:32 am

Reply to topic  [ 2 posts ] 
RobotC Preprocessor Bug 
Author Message

Joined: Mon Feb 16, 2015 9:52 pm
Posts: 2
Post RobotC Preprocessor Bug
Right now, the robotc preprocessor checks that the motor configuration is present before anything else. This makes it fairly tedious to keep all of the motor configurations in sync across various autonomous programs. If it were to instead evaluate any #include statements first, the motor configuration could be extracted into a separate file that can be kept up to date independently.

Tue Feb 17, 2015 12:21 pm
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 620
Post Re: RobotC Preprocessor Bug
You can use a library file for your configuration as of ROBOTC 4.29 and above.

Replace the top of your code's configuration with:

#pragma config(UserModel, "[relative or absolute path to file]")

Ensure the file that contains the configuration code contains the pragma statements and nothing else. You can't have library code + configuration code in the same file.


Timothy Friez
ROBOTC Developer - SW Engineer

Fri Feb 20, 2015 5:20 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 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.