-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.h
52 lines (35 loc) · 1.01 KB
/
configuration.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef _CONFIGURATION_H_
#define _CONFIGURATION_H_
typedef struct conf {
// Speeds
int speed_straight, speed_slow, speed_normal, speed_fast;
// Line PID
float k_p, k_i, k_d;
float k_error, k_error_diff;
float k_p_fast, k_i_fast, k_d_fast;
// Wall PID
float w_k_p, w_k_i, w_k_d;
float w_diff_p;
int w_speed, w_setpoint, w_max_sum_error, w_max_error;
// Line mass limits
int mass_horizontal_lower, mass_horizontal_upper;
int mass_cross_lower, mass_cross_upper;
int mass_bypath_lower, mass_bypath_upper;
int mass_end_lower, mass_end_upper;
// Slices
int slice_upper_start, slice_upper_end;
int slice_lower_start, slice_lower_end;
int dist_15_upper, dist_15_lower;
int dist_20_upper, dist_20_lower;
int dist_side_disappear_1, dist_side_disappear_2;
} conf_t;
/**
* Declaration of the global config object
*/
extern conf_t conf;
void config_init();
int config_reload();
char * config_get_str(const char * name);
float config_get_float(const char * name);
int config_get_int(const char * name);
#endif