|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
No Tracking During Autonomous
The camera does not track (or do anything) during autonomous mode, but it does a wonderful job during OI mode. Why?
Also, we will want to turn the camera off during OI. How? Also, my print statements (eg. printf("Confidence=%d\n,T_Packet_Data.confidence); ) are ignored from within user_routines_fast.c. Do I need to use a loop counter to slow things down? I am using frc_camera_2.1 with last year's RC (at the moment). Jason |
|
#2
|
|||||
|
|||||
|
Re: No Tracking During Autonomous
To receive data from the camera, you have to call Camera_Handler(). To make the camera servos track the light, you have to call Servo_Track(). Add those two lines to the User_Autonomous_Code() function, immediately after the call to Getdata(&rxdata).
You should also remove the call to Generate_Pwms() and replace it with a call to PWM(pwm13,pwm14,pwm15,pwm16) instead. Kevin's camera code uses non-twitchy interrupt-based signal generation for those pins, and calling IFI's software-based routine will cause conflicts and give unusable output. To "turn off" the camera, just stop calling Camera_Handler() and Servo_Track() from inside Process_Data_From_Master_uP(). In any code file where you want to use printf(), you need to #include <stdio.h> at the top of the file. The camera code doesn't do that for user_routines_fast.c, so you'll have to add it yourself. |
|
#3
|
|||
|
|||
|
Re: No Tracking During Autonomous
Quote:
Quote:
|
|
#4
|
||||
|
||||
|
Re: No Tracking During Autonomous
Where does PWM() have to be?
|
|
#5
|
||||
|
||||
|
Re: No Tracking During Autonomous
at the end of the autonomous mode area, it calls "Generate_Pwms". REplace that with "PWM"
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading switches during Autonomous | TimeOut | Programming | 3 | 19-02-2006 16:23 |
| How should we call camera tracking functions during autonomous mode? | SHerpich | Programming | 1 | 15-02-2006 18:33 |
| error window during tracking... | Calvin | LabView and Data Acquisition | 1 | 07-02-2006 14:45 |
| Collision avoidance during autonomous | Andrew Schuetze | Programming | 5 | 17-01-2006 13:24 |
| What do you do during autonomous mode? | Salik Syed | Programming | 46 | 21-03-2004 21:05 |