helidemo_simple.c File Reference

This is a simple demo which shows how to work with libhelicontrol. More...

#include <stdio.h>
#include <errno.h>
#include <helicontrol.h>

Include dependency graph for helidemo_simple.c:

Go to the source code of this file.

Defines

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

Functions

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

Variables

struct usb_dev_handle * handle


Detailed Description

This is a simple demo which shows how to work with libhelicontrol.

It alternates different levels of throttle, thus your helicopter may fly away when you run this example! It is very simple, you have to modify source code to choose the correct model and channel for your helicopter. See helictrl.cc in ../tools for a more interesting example...

Definition in file helidemo_simple.c.


Define Documentation

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

Definition at line 39 of file helidemo_simple.c.


Function Documentation

int main ( void   ) 

Definition at line 77 of file helidemo_simple.c.

References handle, HC_Close(), HC_Init(), 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 45 of file helidemo_simple.c.

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 43 of file helidemo_simple.c.


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