Go to Post If we all keep our "secrets" about our robots, the rest of us don't learn as much. - Rick TYler [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 05-04-2006, 00:10
Alan T Alan T is offline
Registered User
FRC #1696
Team Role: Programmer
 
Join Date: Mar 2006
Location: Black Eagle, MT
Posts: 2
Alan T will become famous soon enough
Fix for CMU cam initalization code 131 error.

We had been fighting the Camera: Inititialized abnormally with code 131 error. Sometimes the camera would work perfectly. Then other times it would fail initialization. It was very inconsistant. Sometimes we would have to pull the backup battery and reset the RC to get it to initialize.

When I tried using the cmu cam on a VEX it happened everytime. I thought it was a hardware communication problem.

My theory is that sometimes the camera "misses" the commands sent during boot initialization. Possibly the camera processor is still initializing? I think the problem is worse on a vex because the getdata loop time is only 18ms on the vex vs 26ms on a FRC.

I added a bit of code in the camera initialization routine. If the initialization fails with error 131 it resets the boot initialization flag.

So far this has completely fixed the problem. The initialization will still fail the first time at state 3. The camera then initializes sucessfully at the next call to Initialize_Camera. It now works great on both the FRC and VEX controllers.

I added the below code to the end of the Initialize_Camera routine in Kevin's camera.c. It goes just before return(return_value);

Code:
 
 //Added 3/26/2006 AAT
 //If initialization fails after waiting for first ACK
 //in state 3, retry boot initialization.
 if(return_value == 131)
 {
  boot_initialization_flag = 1;
 }

alan

Last edited by Alan T : 05-04-2006 at 10:38.
 


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
Code error on RC after downloading "bells and whistles" version of Kevins camera code DanDon Programming 6 10-01-2006 18:07
Intermittent Code Error Plloyd Programming 9 09-04-2005 21:37
CAM ERROR! magical hands Programming 0 03-02-2005 13:44
Error w/ FRC code JamesBrown Programming 2 08-01-2005 16:17
heres the code. y this not working omega Programming 16 31-03-2004 15:18


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

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