-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdash_support.py
More file actions
145 lines (128 loc) · 4 KB
/
dash_support.py
File metadata and controls
145 lines (128 loc) · 4 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# NETWORK PARAMETERS USED FOR RECEPTION
udp_ip = "0.0.0.0"
udp_port = 20777
# GENERAL DISPLAY SETTINGS
display_width = 800
display_height = 480
display_title = 'Codemasters F1 2016'
display_line_width = 2
# COLOURS USED THROUGHOUT THE APPLICATION
# SHIFT LIGHT COLOURS
SL_MAX = (255, 0, 217)
SL_OFF = (105, 105, 105)
SL_RED_OFF = (50, 0, 0)
SL_RED_ON = (255, 0, 0)
SL_YELL_OFF = (82, 78, 18)
SL_YELL_ON = (219, 200, 10)
SL_GREEN_OFF = (0, 45, 0)
SL_GREEN_ON = (50, 205, 50)
SL_SHIFT_NOW = (255, 20, 147)
# GENERAL COLOURS
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
LIGHT_GREY = (211, 211, 211)
IVORY4 = (139, 130, 131)
FOREST_GREEN = (34, 139, 34)
DARK_GREEN = (0, 100, 0)
LIME_GREEN = (50, 205, 50)
TEXT_BG = (39, 63, 41)
TEXT_INSTRU = (58, 64, 86)
# GEAR TEXT X & Y
gear_x = 415
gear_y = 160
# FONT NAMES
LCD_font = "open24displayst"
# FONT SIZES
gear_fontsize = 300
rpm_fontsize = 50
instru_fontsize = 20
# RPM BALLS
rpm_ball_start_x = 25
rpm_ball_start_y = 25
rpm_ball_x_inc = 50
# RPM Values limits [F1 Game]
rpm1 = 8500
rpm2 = 9200
rpm3 = 9400
rpm4 = 9600
rpm5 = 9800
rpm6 = 10000
rpm7 = 10200
rpm8 = 10400
rpm9 = 10600
rpm10 = 10800
rpm11 = 11000
rpm12 = 11200
rpm13 = 11400
rpm14 = 11600
rpm15 = 11800
rpm16 = 12000
rpm_max = 12100
# float m_time;
# float m_lapTime;
# float m_lapDistance;
# float m_totalDistance;
# float m_x; // World space position
# float m_y; // World space position
# float m_z; // World space position
# float m_speed;
# float m_xv; // Velocity in world space
# float m_yv; // Velocity in world space
# float m_zv; // Velocity in world space
# float m_xr; // World space right direction
# float m_yr; // World space right direction
# float m_zr; // World space right direction
# float m_xd; // World space forward direction
# float m_yd; // World space forward direction
# float m_zd; // World space forward direction
# float m_susp_pos_bl;
# float m_susp_pos_br;
# float m_susp_pos_fl;
# float m_susp_pos_fr;
# float m_susp_vel_bl;
# float m_susp_vel_br;
# float m_susp_vel_fl;
# float m_susp_vel_fr;
# float m_wheel_speed_bl;
# float m_wheel_speed_br;
# float m_wheel_speed_fl;
# float m_wheel_speed_fr;
# float m_throttle;
# float m_steer;
# float m_brake;
# float m_clutch;
# float m_gear;
# float m_gforce_lat;
# float m_gforce_lon;
# float m_lap;
# float m_engineRate;
# float m_sli_pro_native_support; // SLI Pro support
# float m_car_position; // car race position
# float m_kers_level; // kers energy left
# float m_kers_max_level; // kers maximum energy
# float m_drs; // 0 = off, 1 = on
# float m_traction_control; // 0 (off) - 2 (high)
# float m_anti_lock_brakes; // 0 (off) - 1 (on)
# float m_fuel_in_tank; // current fuel mass
# float m_fuel_capacity; // fuel capacity
# float m_in_pits; // 0 = none, 1 = pitting, 2 = in pit area
# float m_sector; // 0 = sector1, 1 = sector2; 2 = sector3
# float m_sector1_time; // time of sector1 (or 0)
# float m_sector2_time; // time of sector2 (or 0)
# float m_brakes_temp[4]; // brakes temperature (centigrade)
# float m_wheels_pressure[4]; // wheels pressure PSI
# float m_team_info; // team ID
# float m_total_laps; // total number of laps in this race
# float m_track_size; // track size meters
# float m_last_lap_time; // last lap time
# float m_max_rpm; // cars max RPM, at which point the rev limiter will kick in
# float m_idle_rpm; // cars idle RPM
# float m_max_gears; // maximum number of gears
# float m_sessionType; // 0 = unknown, 1 = practice, 2 = qualifying, 3 = race
# float m_drsAllowed; // 0 = not allowed, 1 = allowed, -1 = invalid / unknown
# float m_track_number; // -1 for unknown, 0-21 for tracks
# float m_vehicleFIAFlags; // -1 = invalid/unknown, 0 = none, 1 = green, 2 = blue, 3 = yellow, 4 = red
# };