Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
178 | Alpin | 1 | |
2 | #include "wiiuse.h" //main.c also needs this (next to wiimote.c) |
||
3 | //wiiuse is a library to interface with the Wiimote |
||
4 | //and written by Michael Laforest |
||
5 | |||
6 | #define MAX_WIIMOTES 1 //Has to be 4; at first I tested it with 1, because |
||
7 | //only 1 Wiimote is needed. But some functions do not |
||
8 | //work then, so seems to be a bug in the wiiuse API. |
||
9 | |||
10 | //ExternalControl struct, which is send to the MikroKopter: |
||
11 | struct str_ExternControl |
||
12 | { |
||
13 | unsigned char Digital[2]; //two 1/0-buttons, not used atm |
||
14 | unsigned char RemoteButtons; // ? something to control the lcd menues?! |
||
15 | signed char Nick; |
||
16 | signed char Roll; |
||
17 | signed char Gier; |
||
18 | unsigned char Gas; //gas value is limited (in the fc sw) to the gas *stick* value |
||
19 | signed char Hight; //sets the hight for the barometric-hight-sensor |
||
20 | unsigned char free; //not used atm |
||
21 | unsigned char Frame; //value, which is send back by the fc for confirmation |
||
22 | unsigned char Config; //if set to 1 the ExternControl is set active |
||
23 | }; |
||
24 | |||
25 | struct str_ExternControl ExternControl; //create an instance of the struct |
||
26 | |||
27 | |||
28 | //Global Variables: |
||
29 | wiimote** mote; //create a wiimote handle/identifier pointerarray |
||
30 | |||
31 | |||
32 | //Function Prototypes offered: |
||
33 | int init_wiimote (void); |
||
34 | void handle_event(struct wiimote_t* wm); |
||
35 | int check_nunchuck(void); |