From c694b93d1c70bcb60a84abee2a62203e12e3597d Mon Sep 17 00:00:00 2001 From: bri3d Date: Mon, 23 Aug 2021 09:06:55 -0600 Subject: [PATCH 1/6] fix downcase --- a2l2xdf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a2l2xdf.py b/a2l2xdf.py index 54b2dc3..511c918 100644 --- a/a2l2xdf.py +++ b/a2l2xdf.py @@ -346,14 +346,14 @@ def coefficients_to_equation(coefficients): if "x" in table_def: xdf_axis_with_table(table, "x", table_def["x"]) - if row["Generate X Axis"] == "True": + if row["Generate X Axis"].lower() == "true": xdf_table_from_axis(root, table_def, "x") else: fake_xdf_axis_with_size(table, "x", 1) if "y" in table_def: xdf_axis_with_table(table, "y", table_def["y"]) - if row["Generate Y Axis"] == "True": + if row["Generate Y Axis"].lower() == "true": xdf_table_from_axis(root, table_def, "y") else: fake_xdf_axis_with_size(table, "y", 1) From 802fb83a87abdaf848b3001270846628474c0026 Mon Sep 17 00:00:00 2001 From: bri3d Date: Mon, 23 Aug 2021 13:36:23 -0600 Subject: [PATCH 2/6] fix floating point --- a2l2xdf.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/a2l2xdf.py b/a2l2xdf.py index 511c918..aab73d7 100644 --- a/a2l2xdf.py +++ b/a2l2xdf.py @@ -8,9 +8,7 @@ from sys import argv from xml.etree.ElementTree import Element, SubElement, Comment, ElementTree -USE_CONSTANTS = ( - False -) # Should we use "constants" / "scalars" in the XDF? They kind of aren't good at all... +USE_CONSTANTS = False # Should we use "constants" / "scalars" in the XDF? They kind of aren't good at all... db = DB() session = ( @@ -79,7 +77,11 @@ def xdf_root_with_configuration(title): def xdf_embeddeddata(element: Element, id, axis_def): embeddeddata = SubElement(element, "EMBEDDEDDATA") - embeddeddata.set("mmedtypeflags", "0x02" if id != "z" else "0x06") + mmedtypeflags = 0x02 if id != "z" else 0x06 + if axis_def["dataSize"] == "FLOAT32_IEEE": + mmedtypeflags += 0x10000 + + embeddeddata.set("mmedtypeflags", hex(mmedtypeflags)) embeddeddata.set("mmedaddress", str(axis_def["address"])) embeddeddata.set("mmedelementsizebits", str(data_sizes[axis_def["dataSize"]] * 8)) embeddeddata.set( From 5bda3478152ed3e28d6d008d836c0ed35c2e9aad Mon Sep 17 00:00:00 2001 From: bri3d Date: Thu, 2 Sep 2021 15:30:57 -0600 Subject: [PATCH 3/6] cleanup and name exhaust flap maps for ef class 2 --- a2l2xdf.csv | 90 ++++++++++++++++------------------------------------- 1 file changed, 26 insertions(+), 64 deletions(-) diff --git a/a2l2xdf.csv b/a2l2xdf.csv index bb50aa4..79dd702 100644 --- a/a2l2xdf.csv +++ b/a2l2xdf.csv @@ -146,73 +146,35 @@ Misc,,c_ctr_temp_poil_h_pump_oil_el,,, Misc,,c_n_pvs_bls_bts_plaus,,, Misc,,c_pv_av_pvs_bls_bts_plaus,,, Misc,,c_tco_max_pump_oil_el,,, +Misc,,id_poil_h_pump_oil_el_maf_grd,,, +Misc,,id_poil_h_pump_oil_el_maf_sp,,, +Misc,,c_n_32_poil_h_pump_oil_el,,, Misc,,c_vs_pvs_bls_bts_plaus,,, Misc,,id_eff_scc_sp_min,,, Misc,,id_eff_scc_sp_min_spt,,, -Misc,,id_gear_max_ef_lock_open[0][0][0],,, -Misc,,id_gear_max_ef_lock_open[0][0][1],,, -Misc,,id_gear_max_ef_lock_open[0][0][2],,, -Misc,,id_gear_max_ef_lock_open[0][1][0],,, -Misc,,id_gear_max_ef_lock_open[0][1][1],,, -Misc,,id_gear_max_ef_lock_open[0][1][2],,, -Misc,,id_gear_max_ef_lock_open[0][2][0],,, -Misc,,id_gear_max_ef_lock_open[0][2][1],,, -Misc,,id_gear_max_ef_lock_open[0][2][2],,, -Misc,,id_gear_max_ef_lock_open[1][0][0],,, -Misc,,id_gear_max_ef_lock_open[1][0][1],,, -Misc,,id_gear_max_ef_lock_open[1][0][2],,, -Misc,,id_gear_max_ef_lock_open[1][1][0],,, -Misc,,id_gear_max_ef_lock_open[1][1][1],,, -Misc,,id_gear_max_ef_lock_open[1][1][2],,, -Misc,,id_gear_max_ef_lock_open[1][2][0],,, -Misc,,id_gear_max_ef_lock_open[1][2][1],,, -Misc,,id_gear_max_ef_lock_open[1][2][2],,, -Misc,,id_poil_h_pump_oil_el_maf_sp,,, -Misc,,id_state_gear_ef_mod_sel[0][0],,, -Misc,,id_state_gear_ef_mod_sel[0][1],,, -Misc,,id_state_gear_ef_mod_sel[0][2],,, -Misc,,id_state_gear_ef_mod_sel[1][0],,, -Misc,,id_state_gear_ef_mod_sel[1][1],,, -Misc,,id_state_gear_ef_mod_sel[1][2],,, -Misc,,id_state_gear_ef_mod_sel[2][0],,, -Misc,,id_state_gear_ef_mod_sel[2][1],,, -Misc,,id_state_gear_ef_mod_sel[2][2],,, -Misc,,id_state_sp_ef_aux[0][0][0],,, -Misc,,id_state_sp_ef_aux[0][0][1],,, -Misc,,id_state_sp_ef_aux[0][0][2],,, -Misc,,id_state_sp_ef_aux[0][1][0],,, -Misc,,id_state_sp_ef_aux[0][1][1],,, -Misc,,id_state_sp_ef_aux[0][1][2],,, -Misc,,id_state_sp_ef_aux[0][2][0],,, -Misc,,id_state_sp_ef_aux[0][2][1],,, -Misc,,id_state_sp_ef_aux[0][2][2],,, -Misc,,id_state_sp_ef_aux[1][0][0],,, -Misc,,id_state_sp_ef_aux[1][0][1],,, -Misc,,id_state_sp_ef_aux[1][0][2],,, -Misc,,id_state_sp_ef_aux[1][1][0],,, -Misc,,id_state_sp_ef_aux[1][1][1],,, -Misc,,id_state_sp_ef_aux[1][1][2],,, -Misc,,id_state_sp_ef_aux[1][2][0],,, -Misc,,id_state_sp_ef_aux[1][2][1],,, -Misc,,id_state_sp_ef_aux[1][2][2],,, -Misc,,id_state_sp_ef[0][0][0],,, -Misc,,id_state_sp_ef[0][0][1],,, -Misc,,id_state_sp_ef[0][0][2],,, -Misc,,id_state_sp_ef[0][1][0],,, -Misc,,id_state_sp_ef[0][1][1],,, -Misc,,id_state_sp_ef[0][1][2],,, -Misc,,id_state_sp_ef[0][2][0],,, -Misc,,id_state_sp_ef[0][2][1],,, -Misc,,id_state_sp_ef[0][2][2],,, -Misc,,id_state_sp_ef[1][0][0],,, -Misc,,id_state_sp_ef[1][0][1],,, -Misc,,id_state_sp_ef[1][0][2],,, -Misc,,id_state_sp_ef[1][1][0],,, -Misc,,id_state_sp_ef[1][1][1],,, -Misc,,id_state_sp_ef[1][1][2],,, -Misc,,id_state_sp_ef[1][2][0],,, -Misc,,id_state_sp_ef[1][2][1],,, -Misc,,id_state_sp_ef[1][2][2],,, +Misc,,id_gear_max_ef_lock_open[0][2][0],Lock Left Exhaust Flap by Gear for Silent mode,, +Misc,,id_gear_max_ef_lock_open[0][2][1],Lock Left Exhaust Flap by Gear for Dynamic mode,, +Misc,,id_gear_max_ef_lock_open[0][2][2],Lock Left Exhaust Flap by Gear for Normal mode,, +Misc,,id_gear_max_ef_lock_open[1][2][0],Lock Right Exhaust Flap by Gear for Silent mode,, +Misc,,id_gear_max_ef_lock_open[1][2][1],Lock Right Exhaust Flap by Gear for Dynamic mode,, +Misc,,id_gear_max_ef_lock_open[1][2][2],Lock Right Exhaust Flap by Gear for Normal mode,, +Misc,,id_state_gear_ef_mod_sel[2][0],Selection between AUX (0) and Normal (1) Maps for Silent mode,, +Misc,,id_state_gear_ef_mod_sel[2][1],Selection between AUX (0) and Normal (1) Maps for Dynamic mode,, +Misc,,id_state_gear_ef_mod_sel[2][2],Selection between AUX (0) and Normal (1) Maps for Normal mode,, +Misc,,id_state_sp_ef_aux[0][2][0],Left Exhaust Flap AUX map for Silent mode,, +Misc,,id_state_sp_ef_aux[0][2][1],Left Exhaust Flap AUX map for Dynamic mode,, +Misc,,id_state_sp_ef_aux[0][2][2],Left Exhaust Flap AUX map for Normal mode,, +Misc,,id_state_sp_ef_aux[1][2][0],Right Exhaust Flap AUX map for Silent mode,, +Misc,,id_state_sp_ef_aux[1][2][1],Right Exhaust Flap AUX map for Dynamic mode,, +Misc,,id_state_sp_ef_aux[1][2][2],Right Exhaust Flap AUX map for Normal mode,, +Misc,,id_state_sp_ef[0][2][0],Left Exhaust Flap map for Silent mode,, +Misc,,id_state_sp_ef[0][2][1],Left Exhaust Flap map for Dynamic mode,, +Misc,,id_state_sp_ef[0][2][2],Left Exhaust Flap map for Normal mode,, +Misc,,id_state_sp_ef[1][2][0],Right Exhaust Flap map for Silent mode,, +Misc,,id_state_sp_ef[1][2][1],Right Exhaust Flap map for Dynamic mode,, +Misc,,id_state_sp_ef[1][2][2],Right Exhaust Flap map for Normal mode,, +Misc,,id_idx_var_pow_clas_ef,Power Class Mapping for Exhaust Flaps,, +Misc,,id_idx_noise_mod_aut_ef,Driving Mode Mapping for Exhaust Flaps,, Misc,,ip_cam_sp_is_vcp[0],,, Misc,,ip_cam_sp_is_vcp[1],,, Misc,,ip_cam_sp_vcp[0][0][0],,, From f829f639b53b3b7fce4483ec8855197fa8a3f36a Mon Sep 17 00:00:00 2001 From: amiriello Date: Mon, 6 Sep 2021 22:16:25 -0400 Subject: [PATCH 4/6] Added descriptions for turbocharger limits --- a2l2xdf.csv | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/a2l2xdf.csv b/a2l2xdf.csv index bb50aa4..de42236 100644 --- a/a2l2xdf.csv +++ b/a2l2xdf.csv @@ -17,8 +17,8 @@ Airflow,,ip_prs_loss_aic_1,Air Intake Pressure Drop,, Airflow,,ip_put_max_cap_h_diag,,, Airflow,,ip_put_min_cap_l_diag,,, Airflow,,lc_put_sp_tol_ena_amp,Pressure Ratio Calc Toggle 1=AMP 0=PRS_CHA_UP,, -Airflow,,c_prs_im_sp_lim,,, -Airflow,,c_prs_im_sp_max,,, +Airflow,,c_prs_im_sp_lim,Maximum Intake Manifold Pressure,, +Airflow,,c_prs_im_sp_max,Maximum Requested Intake Manifold Pressure,, Airflow,,ip_tps_sp_mdl_max,,, Fuel,Flex Fuel,c_fac_afu_ratio_man,Manual E content value,, Fuel,Flex Fuel,c_mff_sp_afu_int,Sensor Volume/Delay (set to 0),, @@ -131,11 +131,11 @@ Limiter,Speed,DATA_LMVLim.LMVLim_vMax_vLim_C_VW.VehSpdl2NotAcv,,, Limiter,,c_m_air_cyl_sp_max,,, Limiter,,c_temp_cop_act_thd[0],,, Limiter,,c_temp_cop_act_thd[1],,, -Limiter,,c_tia_thr_tcha_max,,, -Limiter,,c_tia_thr_tcha_max_sp,,, +Turbocharger,,c_tia_thr_tcha_max,Compressor Outlet Temp for Maximum Torque Management,, +Turbocharger,,c_tia_thr_tcha_max_sp,Compressor Outlet Temp to Start Torque Mangement,, Limiter,,ip_m_air_cyl_max_stnd_vvl[0],,, Limiter,,ip_m_air_cyl_max_stnd_vvl[1],,, -Limiter,,ip_prs_up_thr_dif_wide_open_thr,,, +Airflow,,ip_prs_up_thr_dif_wide_open_thr,,, Limiter,,ip_teg_tur_up_sp,,, Limiter,,ip_teg_tur_up_sp[0],,, Limiter,,ip_teg_tur_up_sp[1],,, @@ -572,5 +572,5 @@ Turbocharger,Wastegate,ip_fac_kp_bpa_ctl_cor_pos_1,,, Turbocharger,,ip_fac_eff_cmpr,Turbo Compressor Efficiency,, Turbocharger,,ip_fac_put_sp_bol_atjs,Boost Pressure Launch Control,, Turbocharger,,ip_pq_cha_surge_dl,Turbo Compressor Surge Line,, -Turbocharger,,c_n_tcha_max,,, -Turbocharger,,c_n_tcha_max_sp,,, +Turbocharger,,c_n_tcha_max,Turbocharger Speed for Maximum Toruqe Management,, +Turbocharger,,c_n_tcha_max_sp,Turbocharger Speed to Start Torque Mangement,, From ecac84451dc374fbc8983bbd5e011abe19e96c82 Mon Sep 17 00:00:00 2001 From: amiriello Date: Sat, 25 Sep 2021 11:54:13 -0400 Subject: [PATCH 5/6] Update a2l2xdf.csv --- a2l2xdf.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a2l2xdf.csv b/a2l2xdf.csv index de42236..bc5338d 100644 --- a/a2l2xdf.csv +++ b/a2l2xdf.csv @@ -312,9 +312,9 @@ MPI Inhibitors,,id_tia_toil_mpi_inh,,, MPI Inhibitors,,ip_fup_efp_thd,,, MPI Inhibitors,,ip_maf_int_ast_mpi_inh_thd,,, MPI Inhibitors,,ip_maf_int_thd_clr_mpi_inh,,, -Spark,Knock,ip_dly_inc_ad_1_knk,,, +Spark,Knock,ip_dly_inc_ad_1_knk,Cyl Strokes Between Knock Decay Steps AD1,, Spark,Knock,ip_fac_iga_dec_knk,Knock Energy Muliplier,, -Spark,Knock,ip_dly_inc_fast_knk,,, +Spark,Knock,ip_dly_inc_fast_knk,Cyl Strokes Between Knock Decay Steps,, Spark,Knock,ip_iga_dec_knk,Initial Knock Correction,, Spark,Knock,ip_iga_inc_knk,Knock Correction Decay Amount,, Spark,Knock,ip_knks_gain_1[0],,, From 297d05d0ee19d04516ea63a6e563c6f3770f32bf Mon Sep 17 00:00:00 2001 From: amiriello Date: Sat, 25 Sep 2021 12:06:11 -0400 Subject: [PATCH 6/6] Create .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e0e4d1e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +SC8S5031_C_OEM.a2l.xdf +SC8S5031_C_OEM.a2ldb +SC8S5031_C_OEM.a2l