ecu id parsing fixed in logger. jdm sti ign correction parameters added to logger config.

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@395 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
kascade 2006-12-25 23:59:18 +00:00
parent 5c808d11d4
commit 6e74e03d1f
2 changed files with 34 additions and 5 deletions

View File

@ -817,11 +817,40 @@
</conversions> </conversions>
</parameter> </parameter>
<!-- JDM STI specific - START -->
<parameter id="P89" name="Ign. Corr. AK (Neg. Knock Comp.)" desc="Removes Ignition timing when pinging and knocking occurs.">
<address>
<byte>0x020C60</byte>
</address>
<conversions>
<conversion units="degrees" expr="(x-128)/2" format="0.0"/>
</conversions>
</parameter>
<parameter id="P90" name="Ign. Corr. AT (Coarse Correc.)" desc="Ignition Correction table variables, affected by the IAM and AK.">
<address>
<byte>0x020C61</byte>
</address>
<conversions>
<conversion units="degrees" expr="(x-128)/2" format="0.0"/>
</conversions>
</parameter>
<parameter id="P91" name="Ign. Corr. AP (Learnt Correc.)" desc="Ignition learnt over a period of time. The ECU adds a bit to the knock correction if the car is working well with already high ignition correction values.">
<address>
<byte>0x020C65</byte>
</address>
<conversions>
<conversion units="degrees" expr="(x-128)/2" format="0.0"/>
</conversions>
</parameter>
<!-- JDM STI specific - END -->
<!-- Derived parameters must be specified after standard parameters or parsing of xml will fail!! --> <!-- Derived parameters must be specified after standard parameters or parsing of xml will fail!! -->
<!-- Be careful of cyclic dependencies! --> <!-- Be careful of cyclic dependencies! -->
<parameter id="P200" name="Engine Load (Calculated)" desc="Engine load as calculated from MAF and RPM"> <parameter id="P200" name="Engine Load (Calculated)" desc="Engine load as calculated from MAF and RPM.">
<depends> <depends>
<ref id="P8"/> <ref id="P8"/>
<ref id="P12"/> <ref id="P12"/>
@ -843,7 +872,7 @@
</conversions> </conversions>
</parameter> </parameter>
<parameter id="P202" name="Manifold Relative Pressure (Corrected)" desc="Difference between Manifold Absolute Pressure and Atmospheric Pressure"> <parameter id="P202" name="Manifold Relative Pressure (Corrected)" desc="Difference between Manifold Absolute Pressure and Atmospheric Pressure.">
<depends> <depends>
<ref id="P7"/> <ref id="P7"/>
<ref id="P24"/> <ref id="P24"/>

View File

@ -69,8 +69,8 @@ public final class SSMProtocol implements Protocol {
// TODO: This is not real nice/efficient... // TODO: This is not real nice/efficient...
public boolean isValidEcuInitResponse(byte[] response) { public boolean isValidEcuInitResponse(byte[] response) {
// request responseHeader ecu_id readable_params_switches... checksum // request response_header 3_unknown_bytes 5_ecu_id_bytes readable_params_switches... checksum
// 8010F001BF40 80F01039FF A210113152 58400673FACB842B83FEA800000060CED4FDB060000F200000000000DC0000551E30C0F222000040FB00E10000000000000000 59 // 8010F001BF40 80F01039FF A21011315258400673FACB842B83FEA800000060CED4FDB060000F200000000000DC0000551E30C0F222000040FB00E10000000000000000 59
checkNotNullOrEmpty(response, "response"); checkNotNullOrEmpty(response, "response");
byte[] filteredResponse = filterRequestFromResponse(constructEcuInitRequest(), response); byte[] filteredResponse = filterRequestFromResponse(constructEcuInitRequest(), response);
try { try {
@ -86,7 +86,7 @@ public final class SSMProtocol implements Protocol {
checkNotNullOrEmpty(response, "response"); checkNotNullOrEmpty(response, "response");
byte[] responseData = extractResponseData(filterRequestFromResponse(constructEcuInitRequest(), response)); byte[] responseData = extractResponseData(filterRequestFromResponse(constructEcuInitRequest(), response));
byte[] ecuIdBytes = new byte[5]; byte[] ecuIdBytes = new byte[5];
System.arraycopy(responseData, 0, ecuIdBytes, 0, 5); System.arraycopy(responseData, 3, ecuIdBytes, 0, 5);
return new SSMEcuInit(ecuIdBytes); return new SSMEcuInit(ecuIdBytes);
} }