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;
505 ligi 49
  double alt_mul;
483 ligi 50
 
51
  double nick_add;
52
  double roll_add;
53
  double gier_add;
54
  double gas_add;
505 ligi 55
  double alt_add;
483 ligi 56
 
57
  int rel_axis_nick;
58
  int rel_axis_roll;
59
  int rel_axis_gier;
60
  int rel_axis_gas;
505 ligi 61
  int rel_axis_alt;
483 ligi 62
 
63
  int nick_up_btn;
64
  int nick_down_btn;
65
 
66
  int roll_left_btn;
67
  int roll_right_btn;
68
 
505 ligi 69
  int engine_switch_btn;
70
 
483 ligi 71
  char name[255];
72
  char fname[255];
73
 
74
 
75
  int evdev_id;
76
 
77
  int evdev_out_fd;
78
  int evdev_in_fd;
79
 
80
} inputs[MAX_INPUTS];
81
 
82
 
130 ligi 83
int parse_config(char* fname);
485 ligi 84
void parse_config_input_sections();
130 ligi 85
 
86
#endif