Subversion Repositories Projects

Rev

Rev 505 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 505 Rev 522
Line 32... Line 32...
32
 
32
 
Line 33... Line 33...
33
cfg_bool_t exit_after_init = cfg_false;
33
cfg_bool_t exit_after_init = cfg_false;
34
 
-
 
-
 
34
 
35
 
35
 
Line 36... Line 36...
36
int input_count=0;
36
int input_count=0;
37
 
37
int configured_input_count=0;
Line 38... Line 38...
38
cfg_t *cfg;
38
cfg_t *cfg;
39
 
39
 
40
int parse_config(char* fname)
40
void parse_config(char* fname)
Line 113... Line 113...
113
}
113
}
Line 114... Line 114...
114
 
114
 
115
void parse_config_input_sections()
115
void parse_config_input_sections()
116
{
116
{
117
  printf("parsing inputs \n");
117
  printf("parsing inputs \n");
Line 118... Line 118...
118
  input_count=cfg_size(cfg,"input");
118
  configured_input_count=cfg_size(cfg,"input");
119
 
119
 
120
  printf("%d inputs configured\n", input_count);
120
  printf("%d inputs configured\n", input_count);
121
  int i;
121
  int i;
122
  int act_input=0;
122
  int act_input=0;
123
  for (i=0;i<input_count;i++)
123
  for (i=0;i<configured_input_count;i++)
Line 124... Line 124...
124
    {
124
    {
Line 147... Line 147...
147
            inputs[act_input].gier_add=cfg_getfloat(input_sect,"gier_add");
147
            inputs[act_input].gier_add=cfg_getfloat(input_sect,"gier_add");
148
            inputs[act_input].gas_add=cfg_getfloat(input_sect,"gas_add");
148
            inputs[act_input].gas_add=cfg_getfloat(input_sect,"gas_add");
Line 149... Line 149...
149
 
149
 
150
 
150
 
Line 151... Line 151...
151
            inputs[act_input].nick_up_btn=cfg_getint(input_sect,"nick_up_btn");
151
            inputs[act_input].nick_up_btn=cfg_getint(input_sect,"nick_up_btn");
Line 152... Line 152...
152
            printf("nick_up_btn %d\n" ,cfg_getint(input_sect,"nick_up_btn"));
152
            printf("nick_up_btn %ld\n" ,cfg_getint(input_sect,"nick_up_btn"));
153
 
153
 
Line 172... Line 172...
172
            act_input++;
172
            act_input++;
173
          }
173
          }
Line 174... Line 174...
174
 
174
 
175
 
175
 
176
    }
176
    }
177
 
177
 
178
  input_count=act_input;
178
  input_count=act_input;
179
  printf("%d inputs matching\n", input_count);
179
  printf("%d inputs matching\n", input_count);