View Single Post
  #4   Spotlight this post!  
Unread 03-09-2009, 16:17
grim's Avatar
grim grim is offline
Inventor Guru
AKA: Todd
FRC #0549 (Devil Dawgs)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2006
Location: Leominster, MA
Posts: 29
grim is on a distinguished road
Re: Omni Vex code in easyc?

Quote:
Originally Posted by Kingofl337 View Post
Here is the easiest way to do what you wish.
1.) Right click on User Functions -> Add New -> Name it omni and click ok
2.) Click on the project tab.
3.) Right Click on the function name -> Convert to 'C' Code -> Yes
4.) After you function will look like this....

#include "Main.h"

void omni ( void )
{
<---Paste the code in here
}

5.) Paste the code provided between the braces starting at the variables and ending with the last brace.
6.) Rename SetMotor to SetPWM
7.) Goto the UserInclude.h File and under where it says "Add User Code Here"
Add a line : void omni (void );


This should work, I tested it out.
I'm not seeing the the Convert to 'C' code option on the right click menu. Is this an EasyC Pro function? We have a trial version and it doesn't appear.
__________________
"Does fuzzy logic create lint?"