Go to Post Where's the easy button on this thing... - Akash Rastogi [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
  #2   Spotlight this post!  
Unread 10-02-2007, 19:21
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Getting the camera to work in autonomous

Kevin's camera state handler (Camera_Handler(), I believe) wants to be called in the "slow loop" (every 26.2 ms). It counts how many times it has been called to determine how long it has been to determine if a time-out condition has occurred. Make sure your code is calling Camera_Handler() only when there is new data:
Code:
  while (autonomous_mode)   /* DO NOT CHANGE! */
  {
    if (statusflag.NEW_SPI_DATA)      /* 26.2ms loop area */
    {
        Getdata(&rxdata);   /* DO NOT DELETE, or you will be stuck here forever! */

        /* Add your own autonomous code here. */
        Camera_Handler();
        Servo_Track();
        ///////////////////////////////////////////
        //Add whatever code you want here.//
        ///////////////////////////////////////////
        Generate_Pwms(pwm13,pwm14,pwm15,pwm16);

        Putdata(&txdata);   /* DO NOT DELETE, or you will get no PWM outputs! */
    }
  }
Also, uncomment the #define for _DEBUG in camera.h and see what you get in the terminal window when you turn on auton. You should see either the initialization like you would in user mode, or tracking packets (that might only apply to Kevin's "Bells and Whistles" version; not sure).

JBot
__________________
Aren't signatures a bit outdated?

Last edited by JBotAlan : 10-02-2007 at 19:23.
 


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
Getting the Camera out of Idle Eclipse Programming 2 13-02-2007 04:06
Camera did not work for well at the regionals, but worked great at home. Alan Ing Programming 12 17-04-2006 17:43
even simple autonomous code doesn't work?? colman77 Programming 4 17-02-2006 23:58
Getting the Camera and Default Code to Work nukem Programming 5 18-01-2006 11:48
Anyone get Autonomous mode to work? Larry Barello Control System 4 13-01-2004 15:15


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

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