helicontrol.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *  helicontrol - c/c++ control api for silverlit helicopters/quadcopters  *
00003  *  Copyright (C) 2008 by                                                  *
00004  *  Joint Robotics Lab                                                     *
00005  *  Goethe-University Frankfurt, Germany                                   *
00006  *  http://www.jrl.cs.uni-frankfurt.de                                     *
00007  *                                                                         *
00008  *  This library is free software; you can redistribute it and/or          *
00009  *  modify it under the terms of the GNU General Public                    *
00010  *  License as published by the Free Software Foundation                   *
00011  *  version 2 of the License.                                              *
00012  *                                                                         *
00013  *  This program is distributed in the hope that it will be useful,        *
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      *
00016  *  General Public License for more details.                               *
00017  *                                                                         *
00018  *  You should have received a copy of the GNU General Public              *
00019  *  License along with this library; if not, write to the Free Software    *
00020  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA02110-1301 USA*
00021  ***************************************************************************/
00022 
00023 /* $Id: helicontrol.h 272 2008-12-17 22:50:20Z holgerf $ */
00024 
00029 #ifndef HELICONTROL_H
00030 #define HELICONTROL_H
00031 
00032 #include <usb.h>
00033 #include "helicontrol_firmware.h"
00034 
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039 
00040 
00044 #define HC_PICOOZ_LEFT                 -1
00045 
00046 #define HC_PICOOZ_RIGHT                 1
00047 
00048 #define HC_PICOOZ_MAX_THROTTLE         14
00049 
00050 #define HC_PICOOZ_MAX_YAW               3
00051 
00052 #define HC_PICOOZ_CHANNEL_A             0
00053 
00054 #define HC_PICOOZ_CHANNEL_B             1
00055 
00056 #define HC_PICOOZ_CHANNEL_C             2
00057 
00062 #define HC_CHALLENGER_LEFT             -1
00063 
00064 #define HC_CHALLENGER_RIGHT             1
00065 
00066 #define HC_CHALLENGER_MAX_THROTTLE     15
00067 
00068 #define HC_CHALLENGER_MAX_YAW           3
00069 
00070 #define HC_CHALLENGER_CHANNEL_A         1
00071 
00072 #define HC_CHALLENGER_CHANNEL_B         2
00073 
00078 #define HC_URANUS_LEFT                 -1
00079 
00080 #define HC_URANUS_RIGHT                 1
00081 
00082 #define HC_URANUS_MAX_THROTTLE         15
00083 
00084 #define HC_URANUS_MAX_YAW               3
00085 
00086 #define HC_URANUS_CHANNEL_A             1
00087 
00088 #define HC_URANUS_CHANNEL_B             2
00089 
00090 #define HC_URANUS_PITCH_NONE            0
00091 
00092 #define HC_URANUS_PITCH_SLOW            1
00093 
00094 #define HC_URANUS_PITCH_FAST            3
00095 
00096 #define HC_URANUS_PITCH_CONT            2
00097 
00102 #define HC_TANDEMZ_LEFT                 1
00103 
00104 #define HC_TANDEMZ_RIGHT               -1
00105 
00106 #define HC_TANDEMZ_MAX_THROTTLE        15
00107 
00108 #define HC_TANDEMZ_MAX_TRIM            31
00109 
00110 #define HC_TANDEMZ_MAX_PITCH            5
00111 
00112 #define HC_TANDEMZ_MAX_YAW             30
00113 
00114 #define HC_TANDEMZ_CHANNEL_A            0
00115 
00116 #define HC_TANDEMZ_CHANNEL_B            1
00117 
00118 #define HC_TANDEMZ_CHANNEL_C            2
00119 
00120 #define HC_TANDEMZ_PITCH_CENTER         2
00121 
00126 #define HC_SAUCER_LEFT                 -1
00127 
00128 #define HC_SAUCER_RIGHT                 1
00129 
00130 #define HC_SAUCER_FORWARD              -1
00131 
00132 #define HC_SAUCER_BACKWARD              1
00133 
00134 #define HC_SAUCER_MAX_THROTTLE         15
00135 
00136 #define HC_SAUCER_MAX_PITCH             7
00137 
00138 #define HC_SAUCER_MAX_YAW               7
00139 
00140 #define HC_SAUCER_MAX_ROLL              7
00141 
00152 struct usb_dev_handle *HC_Init(void);
00153 
00162 int HC_Read_Firmware_Revision(usb_dev_handle *handle, char *fwstring, size_t maxlen);
00163 
00164 int HC_Read_Firmware_Build_Date(usb_dev_handle *handle, char *datestring, size_t maxlen);
00165 
00166 void HC_Read_Lib_Build_Date(char *datestring, size_t maxlen);
00167 
00176 int HC_CMD_Repeat(usb_dev_handle *handle, char repeat);
00177 
00187 int HC_CMD_Interval(usb_dev_handle *handle, int interval_ms);
00188 
00196 int HC_CMD_Stop(usb_dev_handle *handle);
00197 
00208 int HC_Send_Picooz(usb_dev_handle *handle, char channel, char throttle, char yaw, char trim);
00209 
00221 int HC_Send_Challenger(usb_dev_handle *handle, char channel, char throttle, char yaw, char trim, char fire);
00222 
00235 int HC_Send_Uranus(usb_dev_handle *handle, char channel, char throttle, char yaw, char pitch, char trim, char light);
00236 
00249 int HC_Send_Tandemz(usb_dev_handle *handle, char channel, char throttle, char yaw, char pitch, char pitch_trim, char light);
00250 
00263 int HC_Send_Ibird(usb_dev_handle *handle, char channel, char throttle, char yaw, char unknown, char checksum);
00264 
00275 int HC_Send_Saucer(usb_dev_handle *handle, char throttle, char yaw, char pitch, char roll);
00276 
00283 void HC_Close(usb_dev_handle *handle);
00284 
00285 #ifdef __cplusplus
00286 }
00287 #endif
00288 
00289 #endif /* HELICONTROL_H */

Generated on Thu Dec 18 00:02:52 2008 for libhelicontrol by  doxygen 1.5.3