I'm having a variety of problems, with the new code(
http://www.kevin.org/frc/ifi_frc_sensor_30.zip), and the old encoder code (
http://www.kevin.org/frc/frc_encoder.zip).
First off, I'll talk about the problems we were having with frc_encoder. When I had MPLAB 7.20 installed and was using v2.4 of the C18 compiler, everything compiled, and the encoders worked great on the robot. Here was the problem... there seemed to be about a 1/2 second delay between the robot receiving data from the OI, so I would move a joystick, then it would take 1/2 a second for the motors to start moving. I would release the joystick, and it would take 1/2 a second to stop (I almost had a bad incident with our new 80lb robot running me over).
Okay, now for the 3.0 compatible code.
I have MPLAB 8.00 installed and version 3.10 of the C18 compiler.
I can compile the code as it is downloaded no problem, but when I try to initialize encoder 1 and encoder 2 using the code where i take out the //, it fails at the link step:
MPLINK 4.1, Linker
Copyright (c) 2006 Microchip Technology Inc.
Error - could not find definition of symbol 'Initialize_Encoder_2' in file 'C:\Robot Code\2008\ifi_frc_sensor_30\teleop.o'.
Errors : 1
If I comment out "Initialize_Encoder_2" it will say the same thing about encoder 1.
Is my MPLINK out of date, since it says 2006?
Here are some snapshots of MPLAB with my horrible hand-eye coordination with my trackpad:
The other 4 errors are with this part of code:
Code:
// Remove the // below to initialize encoder #1
Initialize_Encoder_1();
// Remove the // below to initialize encoder #2
Initialize_Encoder_2();
//Skipped a bunch of code here to save you time reading this. The code exists in my version.
if(i == 37 && j >= 191)
{
Encoder_Count = Get_Encoder_1_Count();
printf("E1=%d\r\n",(int)Encoder_Count);
Encoder_Count = Get_Encoder_2_Count();
printf("E2=%d\r\n",(int)Encoder_Count);
/* Encoder_Count = Get_Encoder_3_Count();
printf("E3=%d\r\n",(int)Encoder_Count);
Encoder_Count = Get_Encoder_4_Count();
printf("E4=%d\r\n",(int)Encoder_Count);
Encoder_Count = Get_Encoder_5_Count();
printf("E5=%d\r\n",(int)Encoder_Count);
Encoder_Count = Get_Encoder_6_Count();
printf("E6=%d\r\n\r\n",(int)Encoder_Count); */
}
Hopefully this gives you enough information to solve my problem.