Problem with Kevin's 2008 code

Hello,
We used to have the 2007 code from IFI’s site in our controller, and it worked fine. Now, I have upgraded to Kevin’s 2008 code, along with upgrading our MPLAB (7.21), and MCC (3.1). When we put the compiled version of the 2008 code in the controller, all the code we have works except the controller code.
Meaning when we make code in our autonomous.c be “pwmwhatever = 255”, it works, but the p1_y = pwmwhatever code does not.
The controller code works if we use the old compiled hex of the 2007 code, so it can’t really be a hardware problem.

Has anyone encountered this before, or does anyone have any suggestions?

Assignments in C work from right to left (i.e. take the value on the right side of the ‘=’ and store it into the variable on the left of the ‘=’).

In which case your code should look like


pwmXX = pX_y;

Yes, it should be “pwmwhatever = p1_y”. I maybe wrong, but I don’t think this has anything to do with my code :rolleyes:.

-Kevin

edit:
Turned out I had something commented out in the teleop.c and now that I uncommented it works perfectly.

Thanks Kevin, you’re magic :slight_smile:

You forgot to read the readme.txt file, which tells you to also enable the call to the ISR in ifi_frc.h :D.

-Kevin