|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
camera scope problems
I have been programming our robot's autonomous by using the current positions of the camera servos seen in tracking.c. This, of course, creates scope issues. If anyone could tell me an effective way to pass these variables to user_routines_fast.c, that would be incredibly appreciated. thx!
![]() |
|
#2
|
||||
|
||||
|
Re: camera scope problems
edit the tracking.c and .h files to include custom getPan() getTilt() functions.
|
|
#3
|
||||
|
||||
|
Re: camera scope problems
I don't know how to implement that. I tried making the music the extern variable type but that only us a weird problem that goes something like "pan_servo_position's definition in tracking.o" How in the world do I fix this?
|
|
#4
|
|||
|
|||
|
Re: camera scope problems
It seems to me you wouldnt have to extern the variables. Instead what you can do is to read the PWM output that you are sending to the camera from the servoTrack(). Uh, basically in youre user_routines.h file where it says to add your aliases here you put the lines:
Code:
#define CAMERA_PAN pwm01 #define CAMERA_TILT pwm02 Now to write the get____ functions you just write them like you would any other Accesor Method (sorry too much java programing for me). The only thing you would need to have the function do was return PAN_SERVO or TILT_SERVO. Of course you need to add them to the tracking.h file like any other functions you write. If you still cant get it pm me and ill try to explain better. Sorry if I seem a bit vague, I dont like it when people just tell someone what to do. Thats really not the spirit of first or programming. Yay for problem solving |
|
#5
|
||||
|
||||
|
Re: camera scope problems
um... we used the camera's pwm constants in the autonomous code last year without fail... why would this be causing a scope error at all?
snippet: PHP Code:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Camera \ EMF problems... | zachriggle | Electrical | 17 | 02-05-2006 23:48 |
| Strange Camera Problems | Hutch | Programming | 5 | 25-04-2006 12:45 |
| Camera Servo Problems | pi_guy578 | Programming | 2 | 28-01-2006 13:17 |
| Camera variable scope question | Validius | Programming | 1 | 28-01-2006 09:24 |
| Camera Problems | pickle | Programming | 21 | 20-01-2005 20:43 |