helictrl.cc File Reference

This is a simple command line program which allows to control helicopters using ibhelicontrol. More...

#include <stdio.h>
#include <errno.h>
#include <helicontrol.h>
#include <boost/program_options.hpp>
#include <fstream>
#include <iostream>

Include dependency graph for helictrl.cc:

Go to the source code of this file.

Defines

#define bound(min, num, max)   ((num) >= (min) ? ((num) < (max) ? (num) : (max)) : (min))
#define MODE_NORMAL   0
#define MODE_STOP   2

Functions

static void send_frame (char protocol, char channel, char throttle, char trim, char yaw, char pitch, char special)
int main (int argc, char **argv)

Variables

struct usb_dev_handle * handle


Detailed Description

This is a simple command line program which allows to control helicopters using ibhelicontrol.

It implements a simple remote control, similar to demo_sdl.c in ../demo_sdl, but without! joystick support. helictrl uses the boost library for command line parsing, thus requires a c++ compiler.

Definition in file helictrl.cc.


Define Documentation

#define bound ( min,
num,
max   )     ((num) >= (min) ? ((num) < (max) ? (num) : (max)) : (min))

Definition at line 41 of file helictrl.cc.

#define MODE_NORMAL   0

Definition at line 45 of file helictrl.cc.

#define MODE_STOP   2

Definition at line 46 of file helictrl.cc.


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 83 of file helictrl.cc.

References handle, HC_Close(), HC_CMD_Repeat(), HC_CMD_Stop(), HC_Init(), HC_Read_Firmware_Build_Date(), HC_Read_Firmware_Revision(), HC_Read_Lib_Build_Date(), MODE_NORMAL, MODE_STOP, and send_frame().

Here is the call graph for this function:

static void send_frame ( char  protocol,
char  channel,
char  throttle,
char  trim,
char  yaw,
char  pitch,
char  special 
) [static]

Definition at line 51 of file helictrl.cc.

References bound, handle, HC_Send_Challenger(), HC_Send_Picooz(), HC_Send_Saucer(), HC_Send_Tandemz(), and HC_Send_Uranus().

Here is the call graph for this function:


Variable Documentation

struct usb_dev_handle* handle

Definition at line 49 of file helictrl.cc.


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