Blame |
Last modification |
View Log
| RSS feed
#include "wiiuse.h" //main.c also needs this (next to wiimote.c)
//wiiuse is a library to interface with the Wiimote
//and written by Michael Laforest
#define MAX_WIIMOTES 1 //Has to be 4; at first I tested it with 1, because
//only 1 Wiimote is needed. But some functions do not
//work then, so seems to be a bug in the wiiuse API.
//ExternalControl struct, which is send to the MikroKopter:
struct str_ExternControl
{
unsigned char Digital[2]; //two 1/0-buttons, not used atm
unsigned char RemoteButtons; // ? something to control the lcd menues?!
signed char Nick;
signed char Roll;
signed char Gier;
unsigned char Gas; //gas value is limited (in the fc sw) to the gas *stick* value
signed char Hight; //sets the hight for the barometric-hight-sensor
unsigned char free; //not used atm
unsigned char Frame; //value, which is send back by the fc for confirmation
unsigned char Config; //if set to 1 the ExternControl is set active
};
struct str_ExternControl ExternControl; //create an instance of the struct
//Global Variables:
wiimote** mote; //create a wiimote handle/identifier pointerarray
//Function Prototypes offered:
int init_wiimote (void);
void handle_event(struct wiimote_t* wm);
int check_nunchuck(void);