Carregar ficheiros para "/"

This commit is contained in:
2025-05-29 17:19:54 +00:00
parent 454a56e768
commit 80d497730a
5 changed files with 197 additions and 0 deletions

62
BMW ECU.txt Normal file
View File

@ -0,0 +1,62 @@
EDC15C4
EDC16C1
EDC16C31
EDC16C35
EDC16CP35
EDC17C06
EDC17_C41
EDC17_C50
EDC17_C56
EDC17C76
EDC17CP02
EDC17CP06
EDC17CP09
EDC17CP41
EDC17CP45
EDC17CP49
MD1CP002
MD1CS001
M1.7.3
M1.7.2
ME5.2
M5.2
M5.2.1
ME7.2
ME9.1
ME9.2
MED17.2
MEV9.2
MEV17.4.6
MEVD17
MEVD17.2.1
MEVD17.2.2
MEVD17.2.3
MEVD17.2.4
MEVD17.2.5
MEVD17.2.6
MEVD17.2.8
MEVD17.2.9
MEVD17.2.G
MEVD17.2.H
MG1CS003
MG1CS024
MG1CS201
MS40.X
MS41
MS42
MS43
MS45
MSS50
MSS52
MSS54
MSS65
MSS70
MSD80
MSD81
MSD85
MSD87
MSDV80
MSDV81
MSV70
MSV80
MSV90

84
Grupo VAG ECU.txt Normal file
View File

@ -0,0 +1,84 @@
DCM3.7
DCM6.2
EDC16CP34
EDC16U1
EDC16U31
EDC16U34
EDC17U01
EDC17U05
EDC17C46**
EDC17_C46
EDC17C54
EDC17C64
EDC17C74
EDC17CP04
EDC17CP14
EDC17CP20
EDC17CP24
EDC17CP44
EDC17CP54
EDC17CP74
MD1CP004
MD1CP014
MD1CS004
PCR2.1
PPD1.2
SID301
SID304
IAW4AV_CV
IAW4HV-TV
IAW4LV_ML
IAW4MV
IAW7GV
ME17.3
M3.2
ME3.8.2
M5.9.2
ME7.1.1
ME7.5
ME7.5.10
ME17.5.26
MED17.1.1
MED17.1
MED17.1.21
MED17.1.27
MED17.1.62
MED17.4.2
MED17.5
MED17.5.1
MED17.5.2
MED17.5.20
MED17.5.21
MED17.5.25
MED17.5.26
MED17.5.27
MED17.5.5
MED17.5.6
MED17.1.6X
MED9.1
MED9.5.10
MG1CS001
MG1CS002
MG1CS008
MG1CS011
MG1CS111
SIMOS 19
SIMOS 18
SIMOS 10
SIMOS 11
SIMOS 12
SIMOS 16
SIMOS 18
SIMOS 19
SIMOS 3
SIMOS 6.3
SIMOS 6
SIMOS 7
SIMOS 8
SIMOS 8.2
SIMOS 3.3
SIMOS 2
SIMOS 9
EDC15P+
EDC15VM+
EDC15P

19
JLR ECU.txt Normal file
View File

@ -0,0 +1,19 @@
DCM6.2
EDC17C8
EDC16CP31
EDC16CP39
EDC17CP11
EDC17CP42
EDC17CP55
MED17.9.9
MEDC17.8.3
MED17.8.31
MED17.8.32
MEDC17_9
MPC555
SID201
SID204
SID203
SID208
VISTEON DCU102
EDC15C4

1
__init__.py Normal file
View File

@ -0,0 +1 @@
# Este ficheiro está aqui para que o diretório 'Data' seja tratado como um pacote Python.

31
bmw_ecu_group_handler.py Normal file
View File

@ -0,0 +1,31 @@
import os
# Obtém o diretório do script atual (onde este ficheiro .py está)
script_dir = os.path.dirname(os.path.abspath(__file__))
# Constrói o caminho para o ficheiro 'BMW ECU.txt' relativo a este script
BMW_ECU_LIST_FILE = os.path.join(script_dir, 'BMW ECU.txt')
def load_bmw_ecu_list():
"""Carrega a lista de famílias de ECU BMW a partir do ficheiro BMW ECU.txt."""
bmw_ecu_set = set()
try:
with open(BMW_ECU_LIST_FILE, 'r', encoding='utf-8') as f:
for line in f:
line = line.strip()
if line and not line.startswith('#'): # Ignora linhas vazias e comentários
bmw_ecu_set.add(line)
except FileNotFoundError:
print(f"Aviso: O ficheiro {BMW_ECU_LIST_FILE} não foi encontrado.")
except Exception as e:
print(f"Erro ao ler o ficheiro {BMW_ECU_LIST_FILE}: {e}")
return bmw_ecu_set
if __name__ == '__main__':
# Teste rápido para verificar se o carregamento funciona
bmw_list = load_bmw_ecu_list()
if bmw_list:
print(f"Carregadas {len(bmw_list)} famílias de ECU BMW:")
for ecu in sorted(list(bmw_list)):
print(f"- {ecu}")
else:
print("Nenhuma família de ECU BMW carregada ou ficheiro não encontrado.")