Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cedricp/ddt4all
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedric PAILLE committed Aug 21, 2017
2 parents a94e5ac + 082e2a9 commit 77db6c6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 20 deletions.
21 changes: 9 additions & 12 deletions ddt4all.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,17 @@ def __init__(self, ecuscan, treeview_ecu):
self.ecu_map = {}

vehicles = [
"ALL", "X06 - TWINGO", "X44 - TWINGO II", "X07 - TWINGO III", "X77 - MODUS",
"X35 - SYMBOL/THALIA", "X65 - CLIO II", "X85 - CLIO III", "X98 - CLIO IV",
"XJA - CLIO (C1A)"
"X87 - CAPTUR", "X38 - FLUENCE", "XFF - FLUENCE II", "X64 - MEGANE/SCENIC I",
"ALL", "XBA - KWID CN", "XBB - KWID BR", "X06 - TWINGO", "X44 - TWINGO II",
"X07 - TWINGO III", "X77 - MODUS", "X35 - SYMBOL/THALIA", "X65 - CLIO II",
"X85 - CLIO III", "X98 - CLIO IV", "XJA - CLIO V", "X87 - CAPTUR",
"XJB - CAPTUR II", "X38 - FLUENCE", "XFF - FLUENCE II", "X64 - MEGANE/SCENIC I",
"X84 - MEGANE/SCENIC II", "X95 - MEGANE/SCENIC III", "XFB - MEGANE IV",
"XFA - SCENIC IV", "X56 - LAGUNA", "X74 - LAGUNA II", "X91 - LAGUNA III",
"X47 - LAGUNA III (tricorps)", "X66 - ESPACE III",
"X81 - ESPACE IV", "XFC - ESPACE V",
"X73 - VELSATIS", "X43 - LATITUDE", "XFD - TALISMAN", "H45 - KOLEOS",
"XZG - KOLEOS II", "XFE - KADJAR", "X33 - WIND", "X09 - TWIZY",
"X10 - ZOE",
"X76 - KANGOO I", "X61 - KANGOO II", "X24 - MASCOTT", "X83 - TRAFFIC II",
"X82 - TRAFFIC III", "X70 - MASTER II", "X62 - MASTER III", "X90 - LOGAN/SANDERO",
"X52 - LOGAN/SANDERO II", "X79 - DUSTER", "XJD - DUSTER II", "X67 - DOKKER",
"X47 - LAGUNA III (tricorps)", "X66 - ESPACE III", "X81 - ESPACE IV", "XFC - ESPACE V",
"X73 - VELSATIS", "X43 - LATITUDE", "XFD - TALISMAN", "H45 - KOLEOS", "XZG - KOLEOS II", "XFE - KADJAR",
"X33 - WIND", "X09 - TWIZY", "X10 - ZOE", "X76 - KANGOO I", "X61 - KANGOO II", "XFK - KANGOO II",
"X24 - MASCOTT", "X83 - TRAFFIC II", "X82 - TRAFFIC III", "X70 - MASTER II", "X62 - MASTER III",
"X90 - LOGAN/SANDERO", "X52 - LOGAN/SANDERO II", "X79 - DUSTER", "XJD - DUSTER II", "X67 - DOKKER",
"X92 - LODGY", "X02 - MICRA (NISSAN)", "X21 - NOTE (NISSAN)"
]

Expand Down
18 changes: 14 additions & 4 deletions elm.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,11 @@ def send_can(self, command):
if result[:2] == '7F':
noerrors = False

errorstr = "Unknown"
# check for negative response (repeat the same as in cmd())
if result[:2] == '7F' and result[6:8] in negrsp.keys():
if result[:2] == '7F':
if result[6:8] in negrsp.keys():
errorstr = negrsp[result[6:8]]
if self.vf != 0:
tmstr = datetime.now().strftime("%H:%M:%S.%f")[:-3]
self.vf.write(
Expand All @@ -835,7 +838,7 @@ def send_can(self, command):
result = ' '.join(a + b for a, b in zip(result[::2], result[1::2]))
return result
else:
return "WRONG RESPONSE"
return "WRONG RESPONSE : " + errorstr

def send_can_cfc0(self, command):

Expand Down Expand Up @@ -936,7 +939,7 @@ def send_can_cfc0(self, command):

# now we are going to receive data. st or ff should be in responses[0]
if len(responses) != 1:
return "WRONG RESPONSE"
return "WRONG RESPONSE MULTILINE CFC0"

result = ""
noerrors = True
Expand Down Expand Up @@ -984,12 +987,19 @@ def send_can_cfc0(self, command):
self.error_frame += 1
noerrors = False

errorstr = "Unknown"
# check for negative response (repeat the same as in cmd())
if result[:2] == '7F':
if result[6:8] in negrsp.keys():
errorstr = negrsp[result[6:8]]
noerrors = False

if len(result) / 2 >= nbytes and noerrors:
# split by bytes and return
result = ' '.join(a + b for a, b in zip(result[::2], result[1::2]))
return result
else:
return "WRONG RESPONSE"
return "WRONG RESPONSE CFC0 " + errorstr

def send_raw(self, command):

Expand Down
Binary file modified locale/fr/LC_MESSAGES/ddt4all.mo
Binary file not shown.
8 changes: 4 additions & 4 deletions locale/fr/LC_MESSAGES/ddt4all.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-11 21:50+0200\n"
"PO-Revision-Date: 2017-06-11 21:59+0200\n"
"PO-Revision-Date: 2017-08-19 13:35+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr_FR\n"
Expand Down Expand Up @@ -131,7 +131,7 @@ msgstr "Invalide"

#: parameters.py:898
msgid "Cannot call request "
msgstr "Appel eequête impossible"
msgstr "Appel requête impossible"

#: parameters.py:917
msgid "Clearing DTC information"
Expand Down Expand Up @@ -159,12 +159,12 @@ msgstr "Pas de DTC"

#: parameters.py:988
msgid "Clear ALL DTC"
msgstr "EFFACCER TOUT LES DTC"
msgstr "EFFACER TOUT LES DTC"

#: parameters.py:994
msgid "ECU trouble codes"
msgstr "Code défauts ECU"

#: parameters.py:1027
msgid "Parsing screen "
msgstr "Lecture des écrans"
msgstr "Analyse des écrans"

0 comments on commit 77db6c6

Please sign in to comment.