Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
130 ligi 1
#if !defined(CONFIG_H)
2
#define CONFIG_H
3
 
483 ligi 4
 
5
#define MAX_INPUTS 5
6
 
130 ligi 7
#include <confuse.h>
483 ligi 8
#include "evdev_handler.h"
130 ligi 9
 
10
// values from config 
11
extern char *input_evdev_name;
140 ligi 12
extern char *input_joydev_name;
130 ligi 13
extern char *bluetooth_mac;
14
extern int  mk_socket_port;
483 ligi 15
extern char *mk_tty;
130 ligi 16
extern int  loop_delay;
17
 
18
extern double nick_mul;
19
extern double roll_mul;
20
extern double gier_mul;
21
extern double gas_mul;
22
 
140 ligi 23
extern double nick_add;
24
extern double roll_add;
25
extern double gier_add;
26
extern double gas_add;
130 ligi 27
 
28
extern int rel_axis_nick;
29
extern int rel_axis_roll;
30
extern int rel_axis_gier;
31
extern int rel_axis_gas;
32
 
33
 
34
extern cfg_bool_t exit_after_init ;
35
 
36
 
483 ligi 37
extern int input_count;
38
struct  {
130 ligi 39
 
483 ligi 40
 
41
  int  *evdev_rel_axis;
42
  char *evdev_button;
43
 
44
  double nick_mul;
45
  double roll_mul;
46
  double gier_mul;
47
  double gas_mul;
48
 
49
  double nick_add;
50
  double roll_add;
51
  double gier_add;
52
  double gas_add;
53
 
54
  int rel_axis_nick;
55
  int rel_axis_roll;
56
  int rel_axis_gier;
57
  int rel_axis_gas;
58
 
59
 
60
 
61
  int nick_up_btn;
62
  int nick_down_btn;
63
 
64
  int roll_left_btn;
65
  int roll_right_btn;
66
 
67
  char name[255];
68
  char fname[255];
69
 
70
 
71
  int evdev_id;
72
 
73
 
74
 
75
  int evdev_out_fd;
76
  int evdev_in_fd;
77
 
78
} inputs[MAX_INPUTS];
79
 
80
 
130 ligi 81
int parse_config(char* fname);
82
 
483 ligi 83
 
130 ligi 84
#endif