From 800f3ae905cc46773c70899d057f403edbe37845 Mon Sep 17 00:00:00 2001 From: Marianpol Date: Wed, 16 Mar 2022 11:15:57 +0100 Subject: [PATCH] Add default DTC status string --- pyren/mod_ecu_default.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyren/mod_ecu_default.py b/pyren/mod_ecu_default.py index 42d7085..1cab4f9 100644 --- a/pyren/mod_ecu_default.py +++ b/pyren/mod_ecu_default.py @@ -85,9 +85,9 @@ def get_default_std_a( df, mn, se, elm, calc, getDTCmnemo ): isAlive = "" if df[dtc].status==1: - isAlive = mod_globals.language_dict['16882'] #ALIVE + isAlive = mod_globals.language_dict.get('16882', 'ALIVE') else: - isAlive = mod_globals.language_dict['646'] #MEMORISED + isAlive = mod_globals.language_dict.get('646', 'MEMORISED') #if not mod_globals.opt_minordtc: # if df[dtc].status==0: #ignore error if it's definition does not exist # DTCs = DTCs[9:] @@ -199,8 +199,8 @@ def get_default_std_b( df, mn, se, elm, calc, getDTCmnemo ): continue isAlive = "" - if df[dtc].status==1: isAlive = mod_globals.language_dict['16882'] #ALIVE - else: isAlive = mod_globals.language_dict['646'] #MEMORISED + if df[dtc].status==1: isAlive = mod_globals.language_dict.get('16882', 'ALIVE') #ALIVE + else: isAlive = mod_globals.language_dict.get('646', 'MEMORISED') #MEMORISED # if df[dtc].status==0: #ignore error if it's definition does not exist # DTCs = DTCs[12:] # continue @@ -307,8 +307,8 @@ def get_default_failflag( df, mn, se, elm, calc ): if df[dtc].status==0: #it is not a problem continue isAlive = "" - if df[dtc].status==1: isAlive = mod_globals.language_dict['16882'] #ALIVE - else: isAlive = mod_globals.language_dict['646'] #MEMORISED + if df[dtc].status==1: isAlive = mod_globals.language_dict.get('16882', 'ALIVE') #ALIVE + else: isAlive = mod_globals.language_dict.get('646', 'MEMORISED') #MEMORISED # Now get the interpretation