Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef PELICAN_PTU_H_
00030 #define PELICAN_PTU_H_
00031
00032
00033 #define HUMMINGBIRD_ROLL_SERVO //generate roll servo output and use HL serial 0 TX for PWM 1
00034 #define HUMMINGBIRD_ROLL_SERVO_ON_SSEL0 //SSEL0 is used for Roll servo, serial 0 TX stays TX pin!
00035 #define CAMMOUNT_XCONFIG // turn roll/pitch commands for camera compensation by 45°
00036 #define PELICAN_PTU //roll/nick servo offset and scales for standard Pelican camera mount, pitch dir -1, roll dir 1
00037 #define CAM_FACING_FRONT_RIGHT //define if camera is facing to the front right, for front left leave undefined
00038
00039
00040 #define CAMERA_OFFSET_HUMMINGBIRD_PITCH 0
00041 #define CAMERA_OFFSET_HUMMINGBIRD_ROLL 0
00042
00043 #define HUMMINGBIRD_SERVO_DIRECTION_PITCH 1 //1: servo mounted on right hand side of camera, -1: left
00044 #define HUMMINGBIRD_SERVO_DIRECTION_ROLL -1
00045
00046 void PTU_init(void);
00047 void PTU_update(void);
00048 void SERVO_pitch_move(int);
00049 void SERVO_roll_move(int);
00050
00051
00052 struct CAMERA_PTU {
00053
00054 int servo_roll_offset;
00055 int servo_pitch_offset;
00056
00057 int servo_roll_scale;
00058 int servo_pitch_scale;
00059
00060 int servo_pitch_min;
00061 int servo_pitch_max;
00062
00063 int servo_roll_min;
00064 int servo_roll_max;
00065 };
00066
00067 extern struct CAMERA_PTU CAMERA_ptu;
00068
00069 struct CAMERA_COMMANDS {
00070
00071 unsigned short status;
00072 short chksum;
00073 int desired_angle_pitch;
00074 int desired_angle_roll;
00075 };
00076
00077 extern struct CAMERA_COMMANDS CAMERA_Commands;
00078
00079 #endif
00080