Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricp committed Jul 2, 2017
1 parent e9ef405 commit 618d6a8
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 10 deletions.
2 changes: 2 additions & 0 deletions ddt4all.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ def launchPlugin(self, pim):
if self.paramview:
self.paramview.init('')
pim()
if self.paramview:
self.paramview.initELM()

def screenRename(self):
item = self.treeview_params.currentItem()
Expand Down
8 changes: 8 additions & 0 deletions ecu.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,13 @@ def __init__(self, data, isfile=False):
if os.path.exists("./ecus/" + data + ".xml"):
data = "./ecus/" + data + ".xml"

if isfile and ".xml" not in data[-4:] and ".json" not in data[-5:]:
xmlname = data + ".xml"
if os.path.exists(xmlname):
data = xmlname
else:
data += ".json"

if isfile and '.json' in data:
data2 = "./json/" + data
if os.path.exists(data):
Expand All @@ -752,6 +759,7 @@ def __init__(self, data, isfile=False):
jsdata = zf.read(data)
else:
print "Cannot found file ", data
return

ecudict = json.loads(jsdata)

Expand Down
Empty file modified package.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion plugins/card_programming.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_isk(ecu, ecu_response):


def plugin_entry():
megane_ecu = ecu.Ecu_file("UCH_84_J84_03_60.json", True)
megane_ecu = ecu.Ecu_file("UCH_84_J84_03_60", True)

# Request gathering
start_session_request = megane_ecu.requests[u'Start Diagnostic Session']
Expand Down
2 changes: 1 addition & 1 deletion plugins/clio3_eps_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class Virginizer(gui.QDialog):
def __init__(self):
super(Virginizer, self).__init__()
self.clio_eps = ecu.Ecu_file("DAE_J77_X85_Gen2___v3.7.json", True)
self.clio_eps = ecu.Ecu_file("DAE_J77_X85_Gen2___v3.7", True)
layout = gui.QVBoxLayout()
infos = gui.QLabel("Modus/Clio III EPS VIRGINIZER<br><font color='red'>THIS PLUGIN WILL RESET EPS IMMO DATA<br>GO AWAY IF YOU HAVE NO IDEA OF WHAT IT MEANS</font")
infos.setAlignment(core.Qt.AlignHCenter)
Expand Down
2 changes: 1 addition & 1 deletion plugins/clio4_eps_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class Virginizer(gui.QDialog):
def __init__(self):
super(Virginizer, self).__init__()
self.clio_eps = ecu.Ecu_file("X98ph2_X87ph2_EPS_HFP_v1.00_20150622T140219_20160726T172209.json", True)
self.clio_eps = ecu.Ecu_file("X98ph2_X87ph2_EPS_HFP_v1.00_20150622T140219_20160726T172209", True)
layout = gui.QVBoxLayout()
infos = gui.QLabel("Clio IV EPS VIRGINIZER<br><font color='red'>THIS PLUGIN WILL RESET EPS IMMO DATA<br>GO AWAY IF YOU HAVE NO IDEA OF WHAT IT MEANS</font")
infos.setAlignment(core.Qt.AlignHCenter)
Expand Down
2 changes: 1 addition & 1 deletion plugins/laguna2_uch_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class Virginizer(gui.QDialog):
def __init__(self):
super(Virginizer, self).__init__()
self.laguna_uch = ecu.Ecu_file("UCH___M2S_X74_et_X73.json", True)
self.laguna_uch = ecu.Ecu_file("UCH___M2S_X74_et_X73", True)
layout = gui.QVBoxLayout()
infos = gui.QLabel("LAGUNA II UCH VIRGINIZER<br><font color='red'>THIS PLUGIN WILL ERASE YOUR UCH<br>GO AWAY IF YOU HAVE NO IDEA OF WHAT IT MEANS</font")
infos.setAlignment(core.Qt.AlignHCenter)
Expand Down
2 changes: 1 addition & 1 deletion plugins/laguna3_uch_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class Virginizer(gui.QDialog):
def __init__(self):
super(Virginizer, self).__init__()
self.megane_uch = ecu.Ecu_file("BCM_X91_L43_S_S_SWC_v1.30_20140613T140906.json", True)
self.megane_uch = ecu.Ecu_file("BCM_X91_L43_S_S_SWC_v1.30_20140613T140906", True)
layout = gui.QVBoxLayout()
infos = gui.QLabel("LAGUNA III UCH VIRGINIZER<br><font color='red'>THIS PLUGIN WILL ERASE YOUR UCH<br>GO AWAY IF YOU HAVE NO IDEA OF WHAT IT MEANS</font")
infos.setAlignment(core.Qt.AlignHCenter)
Expand Down
2 changes: 1 addition & 1 deletion plugins/megane2_uch_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class Virginizer(gui.QDialog):
def __init__(self):
super(Virginizer, self).__init__()
self.megane_uch = ecu.Ecu_file("UCH_84_J84_03_60.json", True)
self.megane_uch = ecu.Ecu_file("UCH_84_J84_03_60", True)
layout = gui.QVBoxLayout()
infos = gui.QLabel("MEGANE II UCH VIRGINIZER<br><font color='red'>THIS PLUGIN WILL ERASE YOUR UCH<br>GO AWAY IF YOU HAVE NO IDEA OF WHAT IT MEANS</font")
infos.setAlignment(core.Qt.AlignHCenter)
Expand Down
2 changes: 1 addition & 1 deletion plugins/megane3_eps_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class Virginizer(gui.QDialog):
def __init__(self):
super(Virginizer, self).__init__()
self.megane_eps = ecu.Ecu_file("DAE_X95_X38_X10_v1.88_20120228T113904.json", True)
self.megane_eps = ecu.Ecu_file("DAE_X95_X38_X10_v1.88_20120228T113904", True)
layout = gui.QVBoxLayout()
infos = gui.QLabel("ZOE/FLENCE/Megane III/Scenic III EPS VIRGINIZER<br><font color='red'>THIS PLUGIN WILL RESET EPS IMMO DATA<br>GO AWAY IF YOU HAVE NO IDEA OF WHAT IT MEANS</font")
infos.setAlignment(core.Qt.AlignHCenter)
Expand Down
2 changes: 1 addition & 1 deletion plugins/megane3_uch_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class Virginizer(gui.QDialog):
def __init__(self):
super(Virginizer, self).__init__()
self.megane_uch = ecu.Ecu_file("BCM_X95_SW_2_V_1_2.json", True)
self.megane_uch = ecu.Ecu_file("BCM_X95_SW_2_V_1_2", True)
layout = gui.QVBoxLayout()
infos = gui.QLabel("MEGANE III UCH VIRGINIZER<br><font color='red'>THIS PLUGIN WILL ERASE YOUR UCH<br>GO AWAY IF YOU HAVE NO IDEA OF WHAT IT MEANS</font")
infos.setAlignment(core.Qt.AlignHCenter)
Expand Down
2 changes: 1 addition & 1 deletion plugins/rsat4_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class Virginizer(gui.QDialog):
def __init__(self):
super(Virginizer, self).__init__()
self.airbag_ecu = ecu.Ecu_file("RSAT4_ACU_eng_v15_20150511T131328.json", True)
self.airbag_ecu = ecu.Ecu_file("RSAT4_ACU_eng_v15_20150511T131328", True)
layout = gui.QVBoxLayout()
infos = gui.QLabel("TWINGO III/ZOE/DOKKER/DUSTER ph2/TRAFIC III/CAPTUR/LODGY ph1/2<br>"
"AIRBAG VIRGINIZER<br><font color='red'>THIS PLUGIN WILL UNLOCK AIRBAG CRASH DATA<br>"
Expand Down
3 changes: 2 additions & 1 deletion sniffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ def init(self):
return False

for req in sorted(self.ecurequests.requests.keys()):
self.framecombo.addItem(req)
if 'DTOOL' not in req.upper():
self.framecombo.addItem(req)

self.oktostart = True
self.startbutton.setEnabled(True)
Expand Down

0 comments on commit 618d6a8

Please sign in to comment.