Quote:
|
Originally Posted by mattsavela
Also, the first code the Mark posted, when I put it in MPLab, it won't compile. I think I may be doing something wrong considering that I am new to programming, but when I take it out, it compiles fine. Any ideas?
|
Let's narrow the problem down.
What "baseline" code are you starting with? The IFI 2005 v2.2 default code (
http://www.ifirobotics.com/docs/frc-...2-2005v2.2.zip) or something else, such as your team's 2005 modified code?
The code in my first post was quoted verbatim from the v2.2 default code and wouldn't have to be added. The default code already does what you want. The MPLAB problem you're encountering can be caused by lots of simple mistakes, especially if you've never used it before. It might be misplaced code, or if you aren't starting with the default code then the function Limit_Mix might be missing. Whenever you get an error you want to ask the forum about, post (copy and paste) the actual error message. That usually tells us all we need to know to solve the problem.
As an aside, you'll need to be sure the correct motor pwms are being used.
If you are starting with your team's customized 2005 code then post a zip of the user_routines.c file, so we can see what's been modified and how. Then we'll be able to describe the easiest may to add the one joystick lines if they aren't already there.