#include <stdio.h>
#include <errno.h>
#include <helicontrol.h>
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 |
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 bound | ( | min, | |||
num, | |||||
max | ) | ((num) >= (min) ? ((num) < (max) ? (num) : (max)) : (min)) |
Definition at line 39 of file helidemo_simple.c.
int main | ( | void | ) |
Definition at line 77 of file helidemo_simple.c.
References handle, HC_Close(), HC_Init(), and send_frame().
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().
struct usb_dev_handle* handle |
Definition at line 43 of file helidemo_simple.c.