Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Camera code not working.... (http://www.chiefdelphi.com/forums/showthread.php?t=43640)

DemonYawgmoth 09-02-2006 17:07

Camera code not working....
 
We were trying out some things in the code, and when we loaded on the frc_camera_s code that is available on kevin.org/frc, we found that no robot functions are working. We tested out the code without any of our changes and found once again that no functions worked. We tested it with the default code without any camera stuff and it worked. Joysticks are working properly, and the digital sensor code that we wrote before worked as well. Is there anything that we have to set in kevin's code to make it work?

bear24rw 09-02-2006 17:12

Re: Camera code not working....
 
the camera code kevin wrote does not handle joystick > pwm or OI feed back lights... check out void Process_Data_From_Master_uP(void) in User_routines.c, that is where you can add support for joysticks and sensors

Kevin Watson 09-02-2006 18:55

Re: Camera code not working....
 
Quote:

Originally Posted by DemonYawgmoth
We were trying out some things in the code, and when we loaded on the frc_camera_s code that is available on kevin.org/frc, we found that no robot functions are working. We tested out the code without any of our changes and found once again that no functions worked. We tested it with the default code without any camera stuff and it worked. Joysticks are working properly, and the digital sensor code that we wrote before worked as well. Is there anything that we have to set in kevin's code to make it work?

This is documented in the camera FAQ: http://kevin.org/frc/camera.

-Kevin

DanDon 09-02-2006 18:58

Re: Camera code not working....
 
Quote:

Originally Posted by DemonYawgmoth
We were trying out some things in the code, and when we loaded on the frc_camera_s code that is available on kevin.org/frc, we found that no robot functions are working. We tested out the code without any of our changes and found once again that no functions worked. We tested it with the default code without any camera stuff and it worked. Joysticks are working properly, and the digital sensor code that we wrote before worked as well. Is there anything that we have to set in kevin's code to make it work?

In Kevin's code in the file "user_routines.c" in the
Process_Data_From_Master_uP function, the call to default_routine() is commented out. Uncomment that call and you should have drive control. If you want the drive code to have highest priority and execute regardless of whether camera is connected or not, move the call to default_routine() to in front of the call to the camera functions.

<EDIT>
Kevin beat me to it by 3 minutes ; )
<EDIT>

Hope this helps,

X-Istence 09-02-2006 19:29

Re: Camera code not working....
 
Quote:

Originally Posted by dhoizner
...
If you want the drive code to have highest priority and execute regardless of whether camera is connected or not, move the call to default_routine() to in front of the call to the camera functions.
...

The default_routine() would run after the camera code, even if a camera is attached or not. Also, by moving it in front of the Camera code, you are letting the camera code possibly modify PWM's after your default code, so in effect, the camera would be overriding the user_default code.

DemonYawgmoth 11-02-2006 09:21

Re: Camera code not working....
 
Thanks a lot guys. This is what I get for not reading the FAQ....


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

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