-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdash_support.py
More file actions
140 lines (112 loc) · 3.7 KB
/
dash_support.py
File metadata and controls
140 lines (112 loc) · 3.7 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
# NETWORK PARAMETERS USED FOR RECEPTION
udp_ip = "0.0.0.0"
udp_port = 20777
# GENERAL DISPLAY SETTINGS
display_title = 'Codemasters F1 2016'
display_line_width = 2
# RPM Bars
bar_as_percentage_of_total_height = 0.12
gear_text_height_multiplier = 0.004
gear_text_width_multiplier = 0.425
# POSSIBLE OLD VALUES, NEEDS CHECKING
sector_space_div = 6.5
sector_a_height_multiplier = 0.6
# SECTOR TIMES POSITIONAL PARAMETERS
height_ratio = 0.155 # Ratio multiplier
height_a_multiplier = 1.75
height_b_multiplier = 1.25
height_c_multiplier = 0.75
width_divisor = 80
width_1_multiplier = 0
width_2_multiplier = 0.8
width_3_multiplier = 1.7
laptime_text_height_multiplier = 0.35
laptime_text_width_multiplier = 0.014
lastlap_text_height_multiplier = 0.5
lastlap_text_width_multiplier = 0.014
fastest_lap_text_height_multiplier = 0.59
fastest_lap_text_width_multiplier = 0.014
delta_lap_text_height_multiplier = 0.54
delta_lap_text_width_multiplier = 0.2
mph_text_height_multiplier = 0.06
mph_text_width_multiplier = 0.83
rpm_text_height_multiplier = 0.06
rpm_text_width_multiplier = 0.015
position_text_height_multiplier = 0.35
position_text_width_multiplier = 0.83
lap_text_height_multiplier = 0.55
lap_text_width_multiplier = 0.83
# Throttle and brake pedal position lines
throt_pedal_line_x = 550
throt_pedal_line_y = 290
brake_pedal_line_x = 250
brake_pedal_line_y = 290
# 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)
DRS_OFF = TEXT_BG = (26, 46, 28)
LIME_GREEN = (50, 205, 50)
TEXT_BG = (39, 63, 41)
TEXT_INSTRU = (58, 64, 86)
PURPLE = (163, 1, 117)
YELLOW = (219, 200, 10)
# FONT NAMES
LCD_font = "open24displayst"
# FONT SIZES
gear_fontsize_ratio = 0.45
sector_fontsize_ratio = 0.04
mph_fontsize_ratio = 0.12
laptime_fontsize_ratio = 0.075
instru_fontsize = 20
logo_fontsize = 20
# 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
# F1 Team
f1_teams = ["Red Bull Racing", "Ferari", "McLaren", "Renault F1", "Mercedes F1", "Sauber", "Force India", "Williams",
"Toro Rosso", "blank_9", "blank_10", "Haas Racing", "Manor", "-------------"]
# F1 Circuits
f1_circuits = ["Australia", "Malaysia", "China", "Bahrain", "Spain", "Monaco", "Canada", "Britain", "Germany",
"Hungary", "Belgium", "Italy", "Singapore", "Japan", "Abu Dhabi", "USA", "Brazil", "Austria", "Russia",
"Mexico", "Azerbaijan"]
light_name = ["6k", "7k", "7.5k", "8k", "8.5k", "9k", "9.25K", "9.5k", "9.725k", "10k", "10.25k", "10.5k", "10.75k",
"11.k", "11.25k", "11.5", "11.75k", "12k", "12.25k", "12.5k", "12.7k"]
light_trigger_val = [6500, 7000, 7500, 8000, 8500, 9000, 9250, 9500, 9725, 10000, 10250, 10500, 10750, 11000, 11250,
11500, 11750, 12000, 12250, 12500, 12750]
light_colour = [GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, YELLOW,
YELLOW, YELLOW, YELLOW, YELLOW, RED, RED, RED]
gear_lookup = ["na", "R", "1", "2", "3", "4", "5", "6", "7", "8"]
flags_lookup = ["none", "Green", "Blue", "Yellow", "Red"]