Minor refactoring in MTS Sensor plug-in.

Fixed TableFrame title bar for Mac OS so it is visible.

git-svn-id: https://svn2.assembla.com/svn/romraider/trunk@349 38686702-15cf-42e4-a595-3071df8bf5ea
This commit is contained in:
Dale Schultz 2011-09-29 03:28:02 +00:00
parent 5411569d9c
commit d8fd3fc576
5 changed files with 15 additions and 9 deletions

View File

@ -66,10 +66,13 @@ This is the eleventh beta release of the upcoming official 0.5.3b release.
- Added all defined PLX Sensors according to their documentation
- Added more Innovate MTS LM-2 support for additional sensors. Sensors are now
loaded dynamically when the Logger starts. Sensor units are set via LogWorks.
Wideband errors are reported as the negative value of the error number. For
example, if an LC-1 is in need of calibration -3 will be reported to the Logger.
See MTSSensorInputFunction.java for more state values.
- Updated library COM4J to version: com4j-20110322. This affects Innovate MTS
and Tactrix Openport 2.0 support.
--- Editor ---
- Fixed JInternalFrame.isPalette in TableFarme so table titles are visible on
- Set JInternalFrame.isPalette in TableFarme.java so table titles are visible on
Mac OS.

View File

@ -24,13 +24,13 @@ import com.romraider.logger.external.core.ExternalSensorConversions;
public enum SensorConversionsAFR implements ExternalSensorConversions {
// AFR conversion assumes reported DATA value is Gas AFR
LAMBDA ("Lambda", "x*0.0680272108843537", "0.00", new GaugeMinMax(0.6,1.4,0.08)),
AFR_147 ("AFR Gasoline", "x", "0.00", new GaugeMinMax(9,20,1)), // gasoline
LAMBDA ("Lambda", "x*0.0680272108843537", "0.00", new GaugeMinMax(0.6,1.4,0.1)),
AFR_147 ("AFR Gasoline", "x", "0.00", new GaugeMinMax(9,20,1)), // gasoline
AFR_90 ("AFR Ethonal", "x*0.6122448979591837", "0.00", new GaugeMinMax(5,12,1)), // ethanol
AFR_146 ("AFR Diesel", "x*0.9931972789115646", "0.00", new GaugeMinMax(9,20,1)), // diesel
AFR_64 ("AFR Methonal", "x*0.4353741496598639", "0.00", new GaugeMinMax(4,9,1)),// methanol
AFR_155 ("AFR LPG", "x*1.054421768707483", "0.00", new GaugeMinMax(9,20,1)), // LPG
AFR_172 ("AFR CNG", "x*1.170068027210884", "0.00", new GaugeMinMax(9,20,1)), // CNG
AFR_64 ("AFR Methonal", "x*0.4353741496598639", "0.00", new GaugeMinMax(4,9,1)), // methanol
AFR_155 ("AFR LPG", "x*1.054421768707483", "0.00", new GaugeMinMax(9,20,1)), // LPG
AFR_172 ("AFR CNG", "x*1.170068027210884", "0.00", new GaugeMinMax(9,20,1)), // CNG
AFR_34 ("AFR Hydrogen", "x*2.312925170068027", "0.00", new GaugeMinMax(20,46,2.5)); // Hydrogen
private final String units;

View File

@ -24,7 +24,7 @@ import com.romraider.logger.external.core.ExternalSensorConversions;
public enum SensorConversionsLambda implements ExternalSensorConversions {
// AFR conversion assumes reported DATA value is Lambda
LAMBDA ("Lambda", "x", "0.00", new GaugeMinMax(0.6,1.4,0.08)),
LAMBDA ("Lambda", "x", "0.00", new GaugeMinMax(0.6,1.4,0.1)),
AFR_147 ("AFR Gasoline", "x*14.7", "0.00", new GaugeMinMax(9,20,1)),// gasoline
AFR_90 ("AFR Ethonal", "x*9.0", "0.00", new GaugeMinMax(5,12,1)), // ethanol
AFR_146 ("AFR Diesel", "x*14.6", "0.00", new GaugeMinMax(9,20,1)), // diesel

View File

@ -62,7 +62,9 @@ public final class Lm2MtsDataSource implements ExternalDataSource {
for (int i = 0; i < ports.length; i++) {
connector.usePort(i);
Set<MTSSensor> sensors = connector.getSensors();
dataItems.put(0, new Lm2MtsDataItem("LM-2", 0, "AFR", 20, 9)); // a default entry
if (sensors.isEmpty())
continue;
dataItems.put(0, new Lm2MtsDataItem("LM-2", 0, "AFR", 9, 20)); // a default entry
for (MTSSensor sensor : sensors) {
dataItems.put(
sensor.getInputNumber(),

View File

@ -38,7 +38,8 @@ public class TableFrame extends JInternalFrame implements InternalFrameListener
add(table);
setFrameIcon(null);
setBorder(createBevelBorder(0));
putClientProperty("JInternalFrame.isPalette", true);
if (System.getProperty("os.name").startsWith("Mac OS"))
putClientProperty("JInternalFrame.isPalette", true);
setVisible(false);
setJMenuBar(new TableMenuBar(table));
toolBar = new TableToolBar(table, this);