Go to Post I would suggest spending a few more hours digesting the manual before you finalize your designs. You seem to have missed a few key rules. - GaryVoshol [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 Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 19-02-2006, 13:07
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Code malfunction after robot reset?

I have found myself in a most perplexing programming situation, and I'm hoping someone can help me figure it out in time to actually get this robot programmed before shipping. We have been using Kevin Watson's encoder code as a basis for our own code. The only modification I've made to it so far is to add our own joystick mixing function to user_routines.c, and call it in Process_Data_from_Master_uP(). This function does not do anything with the encoders. I downloaded the fresh code from Kevin's website, put his patched header file in the right place, pasted in the mixing function, compiled it, and downloaded it to the robot. I tested the joysticks, and it worked exactly as expected. I turned off the robot, and came back to it later to find that the code was flipping out. The motors spin at random without touching the joysticks, and if I look in Dashboard, I can see that several of the PWM outputs (including ones my code doesn't touch) are forever incrementing and overflowing, hence the motor craziness. When I switch the robot into autonomous mode, it keeps doing the same thing, despite me having no code in the autonomous function (aside from the IFI default to set all of the PWMs to 127, which is apparently not happening). I have sent the same HEX file to the robot again, and it continues to be crazy. When I put the IFI default code with our mixing function onto the robot, everything behaves again. I replace it with the encoder code, and it flips out.

Basically, my question is, how can the same code work and then suddenly not work? Does the encoder code leave some sort of persistent change even after reset? The fact that this problem persists into autonomous mode indicates to me that this problem extends beyond a simple coding error. Thank you in advance.

EDIT: One other important tidbit. I'm not using PWM 13-16, so I don't think it's a problem with the encoders causing the "special" PWMs to wig out.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_

Last edited by jgannon : 19-02-2006 at 13:30.
 


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
Download code from robot Luminous Programming 4 25-05-2005 13:32
Updated Encoder Code Available Kevin Watson Programming 2 04-01-2005 01:00
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Dangerous.....Code problem?!? Argoth Programming 24 20-02-2004 14:57
about how Drive Train push the robot... shouldn't the force accelerate the robot? Ken Leung Technical Discussion 12 26-11-2001 09:39


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

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