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;
484 ligi 14
extern char *evdev_path;
130 ligi 15
extern int  mk_socket_port;
483 ligi 16
extern char *mk_tty;
130 ligi 17
extern int  loop_delay;
18
 
19
extern double nick_mul;
20
extern double roll_mul;
21
extern double gier_mul;
22
extern double gas_mul;
23
 
140 ligi 24
extern double nick_add;
25
extern double roll_add;
26
extern double gier_add;
27
extern double gas_add;
130 ligi 28
 
29
extern int rel_axis_nick;
30
extern int rel_axis_roll;
31
extern int rel_axis_gier;
32
extern int rel_axis_gas;
33
 
34
 
35
extern cfg_bool_t exit_after_init ;
36
 
37
 
483 ligi 38
extern int input_count;
39
struct  {
130 ligi 40
 
483 ligi 41
 
42
  int  *evdev_rel_axis;
43
  char *evdev_button;
44
 
45
  double nick_mul;
46
  double roll_mul;
47
  double gier_mul;
48
  double gas_mul;
49
 
50
  double nick_add;
51
  double roll_add;
52
  double gier_add;
53
  double gas_add;
54
 
55
  int rel_axis_nick;
56
  int rel_axis_roll;
57
  int rel_axis_gier;
58
  int rel_axis_gas;
59
 
60
 
61
 
62
  int nick_up_btn;
63
  int nick_down_btn;
64
 
65
  int roll_left_btn;
66
  int roll_right_btn;
67
 
68
  char name[255];
69
  char fname[255];
70
 
71
 
72
  int evdev_id;
73
 
74
 
75
 
76
  int evdev_out_fd;
77
  int evdev_in_fd;
78
 
79
} inputs[MAX_INPUTS];
80
 
81
 
130 ligi 82
int parse_config(char* fname);
83
 
483 ligi 84
 
130 ligi 85
#endif