Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2105 - 1
#ifndef _GAMEPAD_H
2
 #define _GAMEPAD_H
3
 
4
#define GAME_PAD "/dev/input/js0"
5
 
6
//Defines for external control
7
#define EC_VALID           0x01  // only valid if this is 1
8
#define EC_GAS_ADD         0x02  // if 1 -> use the GAS Value not as MAX
9
#define EC_IGNORE_RC       0x80  // if 1 -> for Flying without RC-Control 
10
 
11
extern void gamepad_init();
12
extern void read_gamepad_data();
13
extern void create_data_camera(serial_data_struct* pdata_package_camera_control, serial_data_struct* pdata_package_camera_control_gier);
14
extern void create_data_kopter(serial_data_struct* pdata_package_kopter_control);
15
extern int check_if_button_pushed();
16
extern void check_if_controls_active();
17
extern void check_program_switch();
18
extern void get_sensitivity();
19
 
20
extern volatile int *Axis;
21
extern volatile char *Button;
22
extern volatile float Sensitivity;
23
extern int NumberOfAxesAvailiable;
24
extern int NumberOfButtonsAvailiable;
25
extern char GamepadConnected[30];
26
extern u8 IsActive;
27
extern u8 ProgramSelect;
28
 
29
#endif //_GAMEPAD_H