00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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