Go to Post sometimes you just have to escape the wheel. - Tytus Gerrish [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
  #7   Spotlight this post!  
Unread 01-02-2005, 23:59
Joshua Lynn Joshua Lynn is offline
Registered User
FRC #0423 (SEC Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Elkins Park, PA
Posts: 16
Joshua Lynn is on a distinguished road
Lightbulb Re: Unresponsive camera

OK well I feel better that we're not the only ones with this problem.

Summary: camera works fine connected to a PC. Battery power good. All cables good. Still doesn't work although it did work at least once while on the bench but not while on the robot now.


During testing one of two things happened. All the Red PWM lights blinked which means the camera_init failed and about every half second you get the check the cables message. This means the camera_state_flag made it to at least 1.

However most of the time it never made it that far. Got the IFI Initialized message and the joysticks worked, which means the user loop is processing however, there was no camera not found or blinking red lights on the OI. This means that it never made it to camera_state_flag ==1.

Has this happened to anyone else??

The part I can't quite figure out is how camera_state_flag ==1 doesn't happen. But here are my thoughts:

There is new Serial_Write function which uses buffered writing unlike the printf function. (I could be wrong on that, it is what I thought I read somewhere) there is also the wait_for_data function, which may be doing a buffered read. Either way the question is what happens if they fail or time out or whatever they do. This leads me to suspect that the problem is the serial communication at the root of our troubles. So trouble shooting continues by re-verifying everything.

The only component that we didn't know how to test was the TTL-232 board. Magically IFI posted instructions on how to test the TTL serial and the TTL-232 board TODAY! It is on the ifirobotics CMUCam2 page. The document is here:

http://www.ifirobotics.com/docs/ttl-...2005-02-01.pdf

Haven't tried it yet but I believe it to the only part left to be a problem.


I posted a question to IFI in their forum about a replacement or extra TTL-232 board. The may have run out since you cannot purchase a CMUCam through them via their website today. You could a few days ago. Perhaps there is a note in the Team update today.

I may try some additional debugging code to se the history of the camera_state_flag and the delay. camera_state_flag gets set to 1 after the inital delay processed by camera_state_flag ==4.

Code:
case 4:
      if (delay)
        delay--;
      else
      {
        cam_state_flag = 1;
      }
      break;
I want to change the
Code:
 if (delay)
to an open ended condition such as:

Code:
case 4:
      if (delay>=delaycount)
        delay++;
      else
      {
        cam_state_flag = 1;
        delay = 0;
      }
      break;
Need to define a static variable for delaycount and change the case for case 0 and 1. This just seems a bit more robust. BTW this code is all in user_routines.c/Process_Data_From_Master_uP

Please let us know if anyone can come up with a solution for this issue as a whole.
 


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
Scripting Setup and the Camera + Serial Port Drivers CJO Programming 22 11-01-2006 17:42
Camera not found!!! Code\\Pilot Programming 11 02-02-2005 00:04
Kevin Watson's Kick-off Demo Code! Mr. Lim Programming 27 22-01-2005 03:38
Game Field Camera Calibration Matthew_H Regional Competitions 2 15-01-2005 23:09
CMUCam2 Camera Code - Are important parts commented out? Mr. Lim Programming 4 14-01-2005 12:11


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

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