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