-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
fpa_dataset_3Q0_old.bt
205 lines (184 loc) · 7.48 KB
/
fpa_dataset_3Q0_old.bt
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
//------------------------------------------------
//--- 010 Editor v12.0.1 Binary Template
//
// File: fpa_dataset.bt
// Authors: Jille
// Version: 0.1
// Purpose: parse driving profile datasets for 5Q0 gateways
// History: 0.1 - first version
// Comments: red = unknown, yellow = possible, green = sure
//
//------------------------------------------------
BigEndian();
char dataset_version[4] <bgcolor=cGreen,name="Version">; // something like J1 00
byte unknown_0A <bgcolor=cDkYellow, format=hex>; // seems to be 0A always? 0A is also present in the header of 3Q0 FPA datasets, probably determines the type of dataset.
short unknown_1 <bgcolor=cDkRed, format=hex>;
byte unknown_FF00 <bgcolor=cDkYellow, format=hex>; // seems to be the same FF000A01F40001
FSeek(55);
struct
{
ushort data[32] <bgcolor=cDkRed, format=hex>;
} unknown_table [4];
// no idea what this is.
// but row 1 and 3 are totally in relation to each other.
local int i = 0;
local int j = 0;
while( i < 4 )
{
j =0;
while( j < 32 )
{
Printf ("%i\t", unknown_table[i].data[j] );
j++;
}
Printf("\n");
i++;
}
FSeek(760);
struct{
byte possible_profile_data[32] <bgcolor=cDkYellow, format=hex>;
} possible_profiles[8];
// this looks like it could be filling the actual profiles (like: control 1 = normal, control 2 = normal, etc)
// not sure about the amount of profiles.. on 3Q0 it's as follows:
// 12 profiles
// 30 bytes per profile for settings
FSeek(1559);
struct{
byte unknown_set_a_[8] <bgcolor=cDkYellow, format=hex>;
} unknown_set_a[8];
struct{
byte unknown_set_b_[12] <bgcolor=cYellow, format=hex>;
} unknown_set_b[8];
FSeek(1776);
byte set_of_controls_1[32] <bgcolor=cYellow,name=getControlName, format=hex>;
// this appears to be the set of controls
struct{
byte unknown_set_x_[8] <bgcolor=cDkYellow , format=hex>;
} unknown_set_x[18];
FSeek(1952);
byte set_of_controls_2[32] <bgcolor=cYellow,name=getControlName, format=hex>;
// Almost similar to set_of_controls_1.
// It looks like set 1 is the ungrouped version, while set 2 is grouped
// The set of controls seems to be plausible
ubyte unknown_1;
ubyte FPA_profile[12] <format=hex,bgcolor=cGreen,name=getFPAName>;
ulong unknown_2;
byte set_of_controls_3[32] <bgcolor=cYellow,name=getControlName, format=hex>;
FSeek(2873);
struct {
byte possible_indiv_data_[32] <bgcolor=cYellow,name=getFPAName, format=hex>;
}possible_indiv_profiles[7];
struct {
byte unknown_xx[16] <bgcolor=cDkYellow,name=getFPAName, format=hex>;
}unknown_xx_set[7];
// these could be the request values?
local int calculated_checksum;
calculated_checksum = Checksum(CHECKSUM_CRC32, 0,FileSize()-4);
FSeek(FileSize()-4);
LittleEndian();
ulong dataset_checksum <format=hex,bgcolor=cGreen,comment="CRC32">;
Printf(" Checksum in file : %06lx \n", ((unsigned long)dataset_checksum & 0xFFFFFFFFUL));
Printf(" Calculated checksum : %06lx \n\n",((unsigned long)calculated_checksum & 0xFFFFFFFFUL));
if (dataset_checksum != calculated_checksum){
Printf(" ! Checksums are not identical \n ! Copy calculated value into checksum at Variables screen \n");
} else {
Printf(" Checksums are identical, no updates needed\n");
};
Printf(" #################################################\n");
string getControlName(int controlNumber) {
switch (controlNumber) {
case 0x00: return "not set";
case 0x01: return "Engine";
case 0x02: return "Start/Stop System";
case 0x03: return "Gearbox";
case 0x04: return "Rear Differential Lock";
case 0x05: return "Steering";
case 0x06: return "Progressive Steering";
case 0x07: return "DCC";
case 0x08: return "HVAC (Air Conditioning)";
case 0x0A: return "Interior Engine Sound";
case 0x09: return "ACC";
case 0x0B: return "Motorway Light";
case 0x0C: return "Background Lighting";
case 0x0D: return "Air Suspension";
case 0x0E: return "Automatic Belt Pre-Tensioning";
case 0x0F: return "Seat Bolster Setting";
case 0x10: return "Route Option";
case 0x11: return "Navigation";
case 0x12: return "DSG Coasting";
case 0x13: return "Eco Tips";
case 0x14: return "Exterior Engine Sound";
case 0x15: return "Front Differential Lock";
case 0x16: return "Center Differential Lock";
case 0x17: return "Four-Wheel Drive (AWD)";
case 0x18: return "Electronic Torque Vectoring (Audi-Text)";
case 0x19: return "Anti-Slip regulation";
case 0x1A: return "Headlight Control";
case 0x1B: return "Rear spoiler";
case 0x1C: return "ESC System";
case 0x1D: return "Rear Axle Steering";
case 0x1E: return "Adaptive Body Roll Compensation";
case 0x1F: return "Road Recognitiion";
case 0x20: return "Hybrid Drive";
case 0x21: return "Drive";
case 0x22: return "Chassis";
case 0x23: return "Exhaust Valves";
case 0x24: return "Engine Sound";
case 0x25: return "Passenger Compartment";
case 0x26: return "Driver's Seat";
case 0x27: return "Tyre Pressure Monitoring System (TPMS)";
case 0x28: return "Lane Assist";
case 0x29: return "Aggregatelagerung (Audi-Text)";
case 0x2A: return "Magnetic Ride (Audi-Text)";
case 0x2B: return "Sport Select Chassis";
case 0x2C: return "Hill Descent Assist";
case 0x2D: return "Hill Hold Assist";
case 0x2E: return "Parking Assist";
case 0x2F: return "Instrument Cluster";
case 0x30: return "Infotainment System";
case 0x31: return "Eco Driving Tips";
case 0x32: return "Speed Adjustment";
case 0x33: return "Electronic Engine Sound";
case 0x34: return "Nothing displays, just Engine";
case 0x35: return "Nothing displays, just Engine";
case 0x36: return "ESC System";
case 0x37: return "Nothing displays";
case 0x41: return "Engine";
case 0x4B: return "Engine"; //seen on TCR
case 0x4C: return "Freilauf_DefaultON";
default: return "Unknown";
}
}
string getFPAName(int settingNumber) {
switch (settingNumber) {
case 0x00: return "not set";
case 0x01: return "Comfort";
case 0x02: return "Auto/Normal";
case 0x03: return "Dynamic/Sport";
case 0x04: return "Offroad";
case 0x05: return "Eco/Efficiency";
case 0x06: return "Race/Cupra";
case 0x07: return "Individual";
case 0x08: return "Range/PHEV 1/Clubsport";
case 0x09: return "Lift/PHEV 2";
case 0x0A: return "Offroad Snow/PHEV 3/EV On";
case 0x0B: return "Offroad Individual/PHEV 4/Hybrid Auto";
case 0x0C: return "Offroad 4/Hybrid Hold";
case 0x0D: return "Offroad 5/Hybrid Charge";
case 0x0E: return "Offroad 6/Hybrid Area";
case 0x0F: return "EV Off";
case 0x10: return "Second Hold/Torque Vectoring";
case 0x11: return "Racetrack/Hybrid Charge Off";
case 0x12: return "Offroad Level 2/Adaptive";
case 0x13: return "Offroad Level 3/Traction";
case 0x14: return "Offroad Level 4";
case 0x15: return "Hybrid Sport";
case 0x16: return "Second Auto";
case 0x17: return "Unknown Profile";
case 0x28: return "GTE Off";
case 0x29: return "GTE Off 2";
case 0x2A: return "Unknown Profile 2";
case 0xFF: return "none";
default: return "Unknown";
}
}