mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
9b5b6198fd
commit
73d34cd184
|
@ -166,6 +166,9 @@ void printSensors(Logging *log, bool fileFormat) {
|
|||
reportSensorF(log, fileFormat, "mafr", "kg/hr", getRealMaf(), 2);
|
||||
}
|
||||
|
||||
reportSensorF(log, fileFormat, "ENGINE_LOAD", "x", getEngineLoadT(), 2);
|
||||
|
||||
|
||||
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
||||
if (engineConfiguration->hasMapSensor) {
|
||||
reportSensorF(log, fileFormat, "MAP", "kPa", getMap(), 2);
|
||||
|
|
|
@ -276,5 +276,5 @@ int getRusEfiVersion(void) {
|
|||
return 1; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE[0] == 0)
|
||||
return 1; // this is here to make the compiler happy about the unused array
|
||||
return 20150309;
|
||||
return 20150310;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
<orderEntry type="library" name="junit" level="project" />
|
||||
<orderEntry type="library" name="SteelSeries" level="project" />
|
||||
<orderEntry type="module" module-name="io" />
|
||||
<orderEntry type="module" module-name="romraider" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
</module>
|
|
@ -26,6 +26,9 @@ public enum Sensor {
|
|||
TPS("throttle", SensorCategory.SENSOR_INPUTS, "%", 100),
|
||||
VSS("Speed", SensorCategory.SENSOR_INPUTS, "kph", 100),
|
||||
|
||||
ENGINE_LOAD("Engine Load", SensorCategory.SENSOR_INPUTS, "x", 300),
|
||||
|
||||
|
||||
MAFR_CFM("MAFR_CFM", SensorCategory.SENSOR_INPUTS, "cub f/m", 800),
|
||||
CLT_F("Coolant F", SensorCategory.SENSOR_INPUTS, "temperature, F", -40, 500),
|
||||
IAT_F("Intake Air F", SensorCategory.SENSOR_INPUTS, "temperature, F", -40, 350),
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package com.rusefi.core;
|
||||
|
||||
import com.romraider.logger.ecu.comms.query.ResponseImpl;
|
||||
import com.romraider.logger.ecu.definition.EcuDataConvertor;
|
||||
import com.romraider.logger.ecu.definition.EcuDataType;
|
||||
import com.romraider.logger.ecu.definition.LoggerData;
|
||||
import com.romraider.logger.ecu.ui.handler.table.TableUpdateHandler;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -34,7 +40,39 @@ public class SensorCentral {
|
|||
return value;
|
||||
}
|
||||
|
||||
public void setValue(double value, Sensor sensor) {
|
||||
EcuDataConvertor convertor = new EcuDataConvertor() {
|
||||
@Override
|
||||
public double convert(byte[] bytes) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String format(double value) {
|
||||
return Double.toString(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnits() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFormat() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExpression() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDataType() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
public void setValue(double value, final Sensor sensor) {
|
||||
values.put(sensor, value);
|
||||
List<SensorListener> listeners;
|
||||
synchronized (allListeners) {
|
||||
|
@ -44,6 +82,62 @@ public class SensorCentral {
|
|||
return;
|
||||
for (SensorListener listener : listeners)
|
||||
listener.onSensorUpdate(value);
|
||||
|
||||
|
||||
ResponseImpl r = new ResponseImpl();
|
||||
|
||||
|
||||
|
||||
|
||||
LoggerData d = new LoggerData() {
|
||||
@Override
|
||||
public String getId() {
|
||||
return sensor.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return sensor.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return sensor.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EcuDataConvertor getSelectedConvertor() {
|
||||
return convertor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EcuDataConvertor[] getConvertors() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectConvertor(EcuDataConvertor convertor) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EcuDataType getDataType() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelected() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelected(boolean selected) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
};
|
||||
|
||||
r.setDataValue(d, value);
|
||||
TableUpdateHandler.getInstance().handleDataUpdate(r);
|
||||
}
|
||||
|
||||
public static String getInternalAdcRepresentation(double value) {
|
||||
|
@ -81,6 +175,7 @@ public class SensorCentral {
|
|||
addDoubleSensor("tp", Sensor.TPS, es);
|
||||
|
||||
addDoubleSensor(Sensor.VSS, es);
|
||||
addDoubleSensor(Sensor.ENGINE_LOAD, es);
|
||||
addDoubleSensor(Sensor.DWELL0, es);
|
||||
addDoubleSensor(Sensor.DWELL1, es);
|
||||
addDoubleSensor(Sensor.DWELL2, es);
|
||||
|
|
|
@ -22,11 +22,7 @@ package com.romraider.logger.ecu.ui.handler.table;
|
|||
import static com.romraider.util.ParamChecker.isNullOrEmpty;
|
||||
import static java.util.Collections.synchronizedMap;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import com.romraider.logger.ecu.comms.query.Response;
|
||||
import com.romraider.logger.ecu.definition.LoggerData;
|
||||
|
@ -37,7 +33,7 @@ import com.romraider.maps.Table3D;
|
|||
|
||||
public final class TableUpdateHandler implements DataUpdateHandler {
|
||||
private static final TableUpdateHandler INSTANCE = new TableUpdateHandler();
|
||||
private final Map<String, List<Table>> tableMap = synchronizedMap(new HashMap<String, List<Table>>());
|
||||
private final Map<String, List<Table>> tableMap = synchronizedMap(new TreeMap<String, List<Table>>(String.CASE_INSENSITIVE_ORDER));
|
||||
|
||||
private TableUpdateHandler() {
|
||||
tableMap.clear();
|
||||
|
@ -53,8 +49,8 @@ public final class TableUpdateHandler implements DataUpdateHandler {
|
|||
List<Table> tables = tableMap.get(loggerData.getId());
|
||||
if (tables != null && !tables.isEmpty()) {
|
||||
String formattedValue = loggerData.getSelectedConvertor().format(response.getDataValue(loggerData));
|
||||
for(ListIterator<Table> item = tables.listIterator(); item.hasNext();) {
|
||||
item.next().highlightLiveData(formattedValue);
|
||||
for (Table table : tables) {
|
||||
table.highlightLiveData(formattedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ public abstract class Table extends JPanel implements Serializable {
|
|||
protected boolean locked = false;
|
||||
|
||||
protected String logParam = Settings.BLANK;
|
||||
protected boolean overlayLog = false;
|
||||
protected boolean overlayLog = true;
|
||||
|
||||
protected CopyTableWorker copyTableWorker;
|
||||
protected CopySelectionWorker copySelectionWorker;
|
||||
|
|
|
@ -96,8 +96,8 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
private final JComboBox scaleSelection = new JComboBox();
|
||||
|
||||
private final JPanel liveDataPanel = new JPanel();
|
||||
private final JCheckBox overlayLog = new JCheckBox("Overlay Log");
|
||||
private final JButton clearOverlay = new JButton("Clear Overlay");
|
||||
// private final JCheckBox overlayLog = new JCheckBox("Overlay Log");
|
||||
// private final JButton clearOverlay = new JButton("Clear Overlay");
|
||||
private final JLabel liveDataValue = new JLabel();
|
||||
|
||||
private final URL incrementFineImage = getClass().getResource("/graphics/icon-incfine.png");
|
||||
|
@ -171,8 +171,8 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
|
||||
scaleSelection.setPreferredSize(new Dimension(80, 23));
|
||||
|
||||
clearOverlay.setPreferredSize(new Dimension(75, 23));
|
||||
clearOverlay.setBorder(createLineBorder(new Color(150, 150, 150), 1));
|
||||
// clearOverlay.setPreferredSize(new Dimension(75, 23));
|
||||
// clearOverlay.setBorder(createLineBorder(new Color(150, 150, 150), 1));
|
||||
|
||||
incrementByFine.setAlignmentX(JTextArea.CENTER_ALIGNMENT);
|
||||
incrementByFine.setAlignmentY(JTextArea.CENTER_ALIGNMENT);
|
||||
|
@ -194,8 +194,8 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
incrementByFine.setToolTipText("Fine Value Adjustment");
|
||||
incrementByCoarse.setToolTipText("Coarse Value Adjustment");
|
||||
multiply.setToolTipText("Multiply Value");
|
||||
overlayLog.setToolTipText("Enable Overlay Of Real Time Log Data");
|
||||
clearOverlay.setToolTipText("Clear Log Data Overlay Highlights");
|
||||
// overlayLog.setToolTipText("Enable Overlay Of Real Time Log Data");
|
||||
// clearOverlay.setToolTipText("Clear Log Data Overlay Highlights");
|
||||
colorCells.setToolTipText("Color Table Cells");
|
||||
refreshCompare.setToolTipText("Refresh Table Compare");
|
||||
|
||||
|
@ -207,8 +207,8 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
setValue.addMouseListener(this);
|
||||
multiply.addMouseListener(this);
|
||||
scaleSelection.addItemListener(this);
|
||||
overlayLog.addItemListener(this);
|
||||
clearOverlay.addActionListener(this);
|
||||
// overlayLog.addItemListener(this);
|
||||
// clearOverlay.addActionListener(this);
|
||||
colorCells.addMouseListener(this);
|
||||
refreshCompare.addMouseListener(this);
|
||||
|
||||
|
@ -241,12 +241,12 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
im.put(enter, "enterAction");
|
||||
getActionMap().put(im.get(enter), enterAction);
|
||||
|
||||
liveDataPanel.add(overlayLog);
|
||||
liveDataPanel.add(clearOverlay);
|
||||
// liveDataPanel.add(overlayLog);
|
||||
// liveDataPanel.add(clearOverlay);
|
||||
//liveDataPanel.add(liveDataValue);
|
||||
this.add(liveDataPanel);
|
||||
overlayLog.setEnabled(false);
|
||||
clearOverlay.setEnabled(false);
|
||||
// overlayLog.setEnabled(false);
|
||||
// clearOverlay.setEnabled(false);
|
||||
|
||||
incrementFine.getInputMap().put(enter, "enterAction");
|
||||
decrementFine.getInputMap().put(enter, "enterAction");
|
||||
|
@ -330,7 +330,7 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
|
||||
updateToolbarIncrementDecrementValues();
|
||||
|
||||
this.overlayLog.setSelected(selectedTable.getOverlayLog());
|
||||
// this.overlayLog.setSelected(selectedTable.getOverlayLog());
|
||||
this.enable3d.setEnabled(selectedTable.getType() == Settings.TABLE_3D);
|
||||
|
||||
setScales(selectedTable.getScales());
|
||||
|
@ -422,12 +422,12 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
}
|
||||
|
||||
if (null != currentTable && currentTable.isLiveDataSupported() && enabled) {
|
||||
overlayLog.setEnabled(true);
|
||||
clearOverlay.setEnabled(true);
|
||||
// overlayLog.setEnabled(true);
|
||||
// clearOverlay.setEnabled(true);
|
||||
}
|
||||
else{
|
||||
overlayLog.setEnabled(false);
|
||||
clearOverlay.setEnabled(false);
|
||||
// overlayLog.setEnabled(false);
|
||||
// clearOverlay.setEnabled(false);
|
||||
}
|
||||
|
||||
if(null != currentTable && currentTable.isStaticDataTable()) {
|
||||
|
@ -725,9 +725,9 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
} catch (NameNotFoundException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
} else if (e.getSource() == overlayLog) {
|
||||
// enable/disable log overlay and live data display
|
||||
curTable.setOverlayLog(overlayLog.isSelected());
|
||||
// } else if (e.getSource() == overlayLog) {
|
||||
// // enable/disable log overlay and live data display
|
||||
// curTable.setOverlayLog(overlayLog.isSelected());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -739,10 +739,10 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
return;
|
||||
}
|
||||
|
||||
if (e.getSource() == clearOverlay) {
|
||||
// clear log overlay
|
||||
curTable.clearLiveDataTrace();
|
||||
}
|
||||
// if (e.getSource() == clearOverlay) {
|
||||
// // clear log overlay
|
||||
// curTable.clearLiveDataTrace();
|
||||
// }
|
||||
}
|
||||
|
||||
public void setLiveDataValue(String value) {
|
||||
|
|
|
@ -18,20 +18,20 @@
|
|||
|
||||
<table type="3D" name="Ignition Advance" storageaddress="24B8" sizex="16" sizey="16" storagetype="float" endian="big">
|
||||
<scaling units="Engine Load" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1" />
|
||||
<table type="X Axis" storageaddress="28B8" storagetype="float" endian="big">
|
||||
<table type="X Axis" storageaddress="28B8" storagetype="float" endian="big" logparam="engineload">
|
||||
<scaling units="degree" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1" />
|
||||
</table>
|
||||
<table type="Y Axis" storageaddress="28F8" storagetype="float" endian="big">
|
||||
<table type="Y Axis" storageaddress="28F8" storagetype="float" endian="big" logparam="rpm">
|
||||
<scaling units="RPM" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1" />
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table type="3D" name="Fuel Table" storageaddress="2038" sizex="16" sizey="16" storagetype="float" endian="big">
|
||||
<scaling units="Engine Load" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1" />
|
||||
<table type="X Axis" storageaddress="2438" storagetype="float" endian="big">
|
||||
<table type="X Axis" storageaddress="2438" storagetype="float" endian="big" logparam="engineload">
|
||||
<scaling units="degree" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1" />
|
||||
</table>
|
||||
<table type="Y Axis" storageaddress="2478" storagetype="float" endian="big">
|
||||
<table type="Y Axis" storageaddress="2478" storagetype="float" endian="big" logparam="rpm">
|
||||
<scaling units="RPM" expression="x" to_byte="x" format="0.00" fineincrement=".1" coarseincrement="1" />
|
||||
</table>
|
||||
</table>
|
||||
|
|
|
@ -64,6 +64,7 @@ public class SensorGauge {
|
|||
gauge.setValue(sensor.translateValue(value));
|
||||
}
|
||||
});
|
||||
gauge.setValue(sensor.translateValue(SensorCentral.getInstance().getValue(sensor)));
|
||||
gauge.setLcdDecimals(2);
|
||||
|
||||
gauge.addMouseListener(new MouseAdapter() {
|
||||
|
|
Loading…
Reference in New Issue