diff --git a/ddt4all.py b/ddt4all.py index af3c8571..65c752d8 100644 --- a/ddt4all.py +++ b/ddt4all.py @@ -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)" ] diff --git a/elm.py b/elm.py index 6770965b..fb82b107 100644 --- a/elm.py +++ b/elm.py @@ -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( @@ -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): @@ -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 @@ -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): diff --git a/locale/fr/LC_MESSAGES/ddt4all.mo b/locale/fr/LC_MESSAGES/ddt4all.mo index 5749e159..d61c1c52 100644 Binary files a/locale/fr/LC_MESSAGES/ddt4all.mo and b/locale/fr/LC_MESSAGES/ddt4all.mo differ diff --git a/locale/fr/LC_MESSAGES/ddt4all.po b/locale/fr/LC_MESSAGES/ddt4all.po index a3f72ebe..bfcea2be 100644 --- a/locale/fr/LC_MESSAGES/ddt4all.po +++ b/locale/fr/LC_MESSAGES/ddt4all.po @@ -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" @@ -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" @@ -159,7 +159,7 @@ 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" @@ -167,4 +167,4 @@ msgstr "Code défauts ECU" #: parameters.py:1027 msgid "Parsing screen " -msgstr "Lecture des écrans" +msgstr "Analyse des écrans"