added fuel consumption parameter, fixed conversion change data reset issue on live data tab

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@497 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
kascade 2007-02-05 12:26:52 +00:00
parent 0a14f7cd22
commit fb8f2f792e
3 changed files with 32 additions and 9 deletions

View File

@ -68,7 +68,7 @@
<parameter id="P9" name="Vehicle Speed" desc="" ecubyteindex="9" ecubit="7">
<address>0x000010</address>
<conversions>
<conversion units="km/h" expr="x" format="0.0"/>
<conversion units="kph" expr="x" format="0.0"/>
<conversion units="mph" expr="x*0.621371192" format="0.0"/>
</conversions>
</parameter>
@ -590,7 +590,7 @@
<parameter id="P82" name="Memorised Cruise Speed" desc="" ecubyteindex="41" ecubit="5">
<address>0x00010A</address>
<conversions>
<conversion units="km/h" expr="x" format="0"/>
<conversion units="kph" expr="x" format="0"/>
<conversion units="mph" expr="x*0.621371192" format="0"/>
</conversions>
</parameter>
@ -670,8 +670,8 @@
<parameter id="P200" name="Engine Load (Calculated)" desc="Engine load as calculated from MAF and RPM.">
<depends>
<ref parameter="P8"/>
<ref parameter="P12"/>
<ref parameter="P8"/> <!-- Engine Speed -->
<ref parameter="P12"/> <!-- MAF -->
</depends>
<conversions>
<conversion units="2*grams/rev" expr="(P12*60)/P8*2" format="0.00"/>
@ -682,8 +682,8 @@
<parameter id="P201" name="Injector Duty Cycle" desc="">
<depends>
<ref parameter="P8"/>
<ref parameter="P21"/>
<ref parameter="P8"/> <!-- Engine Speed -->
<ref parameter="P21"/> <!-- Fuel Inj. #1 Pulse Width -->
</depends>
<conversions>
<conversion units="%" expr="(P8*P21)/1200" format="0.00"/>
@ -693,8 +693,8 @@
<parameter id="P202" name="Manifold Relative Pressure (Corrected)"
desc="Difference between Manifold Absolute Pressure and Atmospheric Pressure.">
<depends>
<ref parameter="P7"/>
<ref parameter="P24"/>
<ref parameter="P7"/> <!-- MAP -->
<ref parameter="P24"/> <!-- Atmos. Pressure -->
</depends>
<conversions>
<conversion units="psi" expr="[P7:psi]-[P24:psi]" format="0.00"/>
@ -702,6 +702,21 @@
</conversions>
</parameter>
<parameter id="P203" name="Fuel Consumption (Est.)"
desc="Estimated fuel consumption based on MAF, AFR and vehicle speed.">
<depends>
<ref parameter="P9"/> <!-- Vehicle Speed -->
<ref parameter="P12"/> <!-- MAF-->
<ref parameter="P58"/> <!-- AFR-->
</depends>
<conversions>
<conversion units="mpg (US)" expr="([P9:mph]/3600)/((P12/[P58:AFR])/2880)" format="0.00"/>
<conversion units="mpg (UK)" expr="([P9:mph]/3600)/((P12/[P58:AFR])/3459)" format="0.00"/>
<conversion units="km/l" expr="([P9:kph]/3600)/((P12/[P58:AFR])/761)" format="0.00"/>
<conversion units="l/100km" expr="(3600/[P9:kph])*((P12/[P58:AFR])/761)*100" format="0.00"/>
</conversions>
</parameter>
</parameters>
<switches>

View File

@ -99,4 +99,12 @@ public final class LiveDataTableModel extends AbstractTableModel {
}
fireTableDataChanged();
}
public synchronized void resetRow(EcuData ecuData) {
LiveDataRow liveDataRow = dataRowMap.get(ecuData);
if (liveDataRow != null) {
liveDataRow.reset();
fireTableDataChanged();
}
}
}

View File

@ -61,6 +61,6 @@ public final class LiveDataUpdateHandler implements DataUpdateHandler, Convertor
}
public synchronized void notifyConvertorUpdate(EcuData updatedEcuData) {
dataTableModel.fireTableDataChanged();
dataTableModel.resetRow(updatedEcuData);
}
}