![]() |
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! :)
|
Re: camera scope problems
edit the tracking.c and .h files to include custom getPan() getTilt() functions.
|
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?
|
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 pwm01Now 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 |
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:
|
| All times are GMT -5. The time now is 12:02. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi