Go to Post At least I can appreciate the humor in this LOLCODE; it isn't funny when our our robot goes backwards in hybrid mode - sgreco [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #13   Spotlight this post!  
Unread 23-01-2008, 14:11
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
no team
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Austin, TX
Posts: 1,127
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

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:

Click image for larger version

Name:	build failed.PNG
Views:	37
Size:	51.9 KB
ID:	6102

Click image for larger version

Name:	error 5.PNG
Views:	40
Size:	94.1 KB
ID:	6107

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.
__________________
Taking a break from mentoring for a few years. (Is that allowed?!?)

Controls Mentor
@rnazaretian

Previous teams:
Team Fusion, FRC 364
Garnet Squadron, FRC 4901
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does the camera code suits to all versions of MPLAB and C18? razer Programming 3 04-01-2007 14:50
Trying to follow C18 interrupt context code... dcbrown Programming 5 21-12-2006 09:01
Error w/ FRC code JamesBrown Programming 2 08-01-2005 16:17
Programming code Fix FRC Ferazel2001 Programming 6 08-02-2004 02:46
FRC default code hedgehogger Programming 2 21-01-2004 18:41


All times are GMT -5. The time now is 10:10.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi