-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.py
56 lines (51 loc) · 1.12 KB
/
configuration.py
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
52
53
54
55
56
import os
import csv
import logging
configs={
'scriptpath': '~/canlogger',
'configpath': '~/canlogger/configs',
'logdir': '~/logs',
'poweroff_timer': 10,
'nocan_timeout': 69,
'kcd': '~/canlogger/configs/gm_global_a_hs.kcd',
'canbus': 'can0',
'mqtt_enable': 0,
'nbp_enable': 0,
#'serial': '/dev/rfcomm0'
'ip': '192.168.4.1',
'port': 35000,
}
nbp_kpis = {
'tcs_active': None,
'transmission_commanded_gear': None,
'vehicle_dynamics_yaw_rate': 'Deg',
'vdcs_over_understeer': None,
'vdcs_active': None,
'abs_active': None,
'vehicle_stability_lateral_acceleration': 'g',
'steering_wheel_angle': 'Deg',
'accelerator_actual_position': '%',
'boost_pressure_indication': '%',
'platform_brake_position': '%',
'engine_speed': 'RPM',
'speed_average_driven_valid': 'km/h'
}
transmission_gear_map = {
0: -2,
1: 1,
2: 2,
3: 3,
4: 4,
5: 5,
6: 6,
7: 7,
8: 8,
12: 1,
13: 0,
14: -1,
15: 0,
}
for name in configs:
if name in os.environ:
configs[name] = os.getenv(name)
logging.warning(configs)