mirror of https://github.com/rusefi/RomRaider.git
Enginuity 0.2.3 Alpha
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@15 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
cac6b8953b
commit
698a1e7e06
|
@ -50,4 +50,53 @@
|
|||
<table name="Rev Limit" storageaddress="0x291C8" />
|
||||
<table name="Injector Flow Scaling" storageaddress="0x286BB" />
|
||||
</rom>
|
||||
|
||||
<rom base="A4TF400E">
|
||||
<romid>
|
||||
<xmlid>A4TF800E</xmlid>
|
||||
<internalidaddress>200</internalidaddress>
|
||||
<internalidstring>A4TF800E</internalidstring>
|
||||
</romid>
|
||||
</rom>
|
||||
|
||||
<rom base="A4TF400E">
|
||||
<romid>
|
||||
<xmlid>A4TF300E</xmlid>
|
||||
<internalidaddress>200</internalidaddress>
|
||||
<internalidstring>A4TF300E</internalidstring>
|
||||
</romid>
|
||||
</rom>
|
||||
|
||||
<rom base="A4TF400E">
|
||||
<romid>
|
||||
<xmlid>A4TF500F</xmlid>
|
||||
<internalidaddress>200</internalidaddress>
|
||||
<internalidstring>A4TF500F</internalidstring>
|
||||
</romid>
|
||||
</rom>
|
||||
|
||||
<rom base="A4TF400E">
|
||||
<romid>
|
||||
<xmlid>A4TF510F</xmlid>
|
||||
<internalidaddress>200</internalidaddress>
|
||||
<internalidstring>A4TF510F</internalidstring>
|
||||
</romid>
|
||||
</rom>
|
||||
|
||||
<rom base="A4TF400E">
|
||||
<romid>
|
||||
<xmlid>A4TF520F</xmlid>
|
||||
<internalidaddress>200</internalidaddress>
|
||||
<internalidstring>A4TF520F</internalidstring>
|
||||
</romid>
|
||||
</rom>
|
||||
|
||||
<rom base="A4TF400E">
|
||||
<romid>
|
||||
<xmlid>A4TF800F</xmlid>
|
||||
<internalidaddress>200</internalidaddress>
|
||||
<internalidstring>A4TF800F</internalidstring>
|
||||
</romid>
|
||||
</rom>
|
||||
|
||||
</roms>
|
|
@ -6,23 +6,20 @@ Enginuity is currently in ALPHA TEST status, meaning it is untested and not inte
|
|||
|
||||
Until Enginuity reaches a mature point, releases will be quite frequent and will usually contain significant changes. However, some times I may release a revision to add a single feature I'd like users to have, or maybe just to add a certain ECU version. Until more features are complete, version support will be quite limited. If you'd like your ECU version to be added, please visit openecu.org and post a message in the Technical Tuning Software forum, with your image attached.
|
||||
|
||||
0.2.2a Release Notes
|
||||
0.2.3a Release Notes
|
||||
--------------------
|
||||
This release was very rushed as I finally got includes to work but don't have the time to thoroughly test and handle exceptions. This was because I felt it would be better to get an extra day of testing in than waiting to fix the known issues. These issues will be listed below and should be worked around until 0.2.2.1a (or 0.2.3a?) is released, hopefully very soon. 0.2.2a has not been tested and should not be used to tune your car without verifying the data in a hex editor, period. If you don't know what that means, don't do it.
|
||||
|
||||
Known issues:
|
||||
-------------
|
||||
- No handling for "looped" includes in ECU definitions (example:)
|
||||
<xmlid>WRXBASE base="whatever"</xmlid>
|
||||
<xmlid>whatever base="WRXBASE"</xmlid>
|
||||
|
||||
- Definitions must include all tables present in node being included (ie, if BASE has ignition, rev limit and injector scaling, you must provide the remaining information for all of these tables in any definition INCLUDing it.)
|
||||
|
||||
- Nested includes have not been tested (including a node which includes another node). If you're intested in testing, this would be a good one to try.
|
||||
Yesterday's release (0.2.2a) was intended only as a very short term test release, and I got the fixes done about as quickly as I could have hoped. All known issues with current functionality have been dealt with and ECU definition include support is working quite well. We're now ready to move on to more fully developing the interface, which should make users happy. :)
|
||||
|
||||
|
||||
Changes:
|
||||
--------
|
||||
0.2.3a (2/27/2006)
|
||||
------------------
|
||||
- ECU definitions including each other (endless loop) is now handled
|
||||
- "Omit" attribute allows incomplete tables to be removed from inheriting definitions
|
||||
- Nested includes (includes more than 1 definition deep) tested and working properly
|
||||
|
||||
|
||||
0.2.2a (2/26/2006)
|
||||
------------------
|
||||
- Include support in XML definitions (exception handling not yet implemented!)
|
||||
|
|
|
@ -33,7 +33,7 @@ public class ECUEditor extends JFrame implements WindowListener {
|
|||
private RomTree imageList = new RomTree(imageRoot);
|
||||
private Vector<Rom> images = new Vector<Rom>();
|
||||
private Settings settings = new Settings();
|
||||
private String version = new String("0.2.2 Alpha");
|
||||
private String version = new String("0.2.3 Alpha");
|
||||
private String titleText = new String("Enginuity v" + version);
|
||||
private JDesktopPane rightPanel = new JDesktopPane();
|
||||
private Rom lastSelectedRom = null;
|
||||
|
|
|
@ -21,18 +21,13 @@ public class Rom {
|
|||
}
|
||||
|
||||
public void addTable(Table table) {
|
||||
boolean tableExists = false;
|
||||
for (int i = 0; i < tables.size(); i++) {
|
||||
if (tables.get(i).getName().equalsIgnoreCase(table.getName())) {
|
||||
tables.remove(i);
|
||||
tables.add(table);
|
||||
tableExists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!tableExists) {
|
||||
tables.add(table);
|
||||
}
|
||||
tables.add(table);
|
||||
}
|
||||
|
||||
public Table getTable(String tableName) throws TableNotFoundException {
|
||||
|
@ -44,6 +39,14 @@ public class Rom {
|
|||
throw new TableNotFoundException();
|
||||
}
|
||||
|
||||
public void removeTable(String tableName) {
|
||||
for (int i = 0; i < tables.size(); i++) {
|
||||
if (tables.get(i).getName().equalsIgnoreCase(tableName)) {
|
||||
tables.remove(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void populateTables(byte[] binData) {
|
||||
this.binData = binData;
|
||||
for (int i = 0; i < getTables().size(); i++) {
|
||||
|
|
|
@ -4,8 +4,8 @@ package Enginuity.Maps;
|
|||
|
||||
public class Scale {
|
||||
|
||||
public static final int LINEAR = 0;
|
||||
public static final int INVERSE = 1;
|
||||
public static final int LINEAR = 1;
|
||||
public static final int INVERSE = 2;
|
||||
|
||||
private String unit;
|
||||
private String expression;
|
||||
|
@ -54,4 +54,13 @@ public class Scale {
|
|||
public void setIncrement(int increment) {
|
||||
this.increment = increment;
|
||||
}
|
||||
|
||||
public boolean isReady() {
|
||||
if (unit == null) return false;
|
||||
else if (expression == null) return false;
|
||||
else if (format == null) return false;
|
||||
else if (increment < 1) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -11,8 +11,8 @@ import javax.swing.JPanel;
|
|||
|
||||
public abstract class Table extends JPanel {
|
||||
|
||||
public static final int ENDIAN_LITTLE= 0;
|
||||
public static final int ENDIAN_BIG = 1;
|
||||
public static final int ENDIAN_LITTLE= 1;
|
||||
public static final int ENDIAN_BIG = 2;
|
||||
public static final int TABLE_1D = 1;
|
||||
public static final int TABLE_2D = 2;
|
||||
public static final int TABLE_3D = 3;
|
||||
|
|
|
@ -59,5 +59,5 @@ public class Table1D extends Table {
|
|||
data[i].setColor(Color.WHITE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -171,8 +171,9 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
|
|||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
} catch (RomNotFoundException ex) {
|
||||
new JOptionPane().showMessageDialog(parent, "ECU Definition Not Found", inputFile.getName() + " - Error", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
|
||||
new JOptionPane().showMessageDialog(parent, "ECU Definition Not Found", "Error Loading " + inputFile.getName(), JOptionPane.ERROR_MESSAGE);
|
||||
} catch (StackOverflowError ex) {
|
||||
new JOptionPane().showMessageDialog(parent, "Malformed \"base\" attribute in XML definitions.", "Error Loading ROM", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
package Enginuity.XML;
|
||||
|
||||
import Enginuity.XML.RomNotFoundException;
|
||||
import Enginuity.XML.TableNotFoundException;
|
||||
import Enginuity.Maps.*;
|
||||
import javax.management.modelmbean.XMLParseException;
|
||||
import org.w3c.dom.Node;
|
||||
|
@ -13,7 +11,7 @@ public class DOMRomUnmarshaller {
|
|||
|
||||
public DOMRomUnmarshaller() { }
|
||||
|
||||
public Rom unmarshallXMLDefinition (Node rootNode, byte[] input) throws RomNotFoundException, XMLParseException {
|
||||
public Rom unmarshallXMLDefinition (Node rootNode, byte[] input) throws RomNotFoundException, XMLParseException, StackOverflowError {
|
||||
try {
|
||||
Node n;
|
||||
NodeList nodes = rootNode.getChildNodes();
|
||||
|
@ -40,12 +38,13 @@ public class DOMRomUnmarshaller {
|
|||
}
|
||||
} catch (NullPointerException ex) {
|
||||
System.out.println(ex);
|
||||
} catch (StackOverflowError ex) { //endless loop in includes
|
||||
throw new StackOverflowError();
|
||||
}
|
||||
System.out.println("XMLDefinition");
|
||||
throw new RomNotFoundException();
|
||||
}
|
||||
|
||||
public Rom unmarshallRom (Node rootNode, Rom rom) throws XMLParseException, RomNotFoundException {
|
||||
public Rom unmarshallRom (Node rootNode, Rom rom) throws XMLParseException, RomNotFoundException, StackOverflowError {
|
||||
Node n;
|
||||
NodeList nodes = rootNode.getChildNodes();
|
||||
|
||||
|
@ -66,9 +65,13 @@ public class DOMRomUnmarshaller {
|
|||
table = rom.getTable(unmarshallAttribute(n, "name", "unknown"));
|
||||
} catch (TableNotFoundException e) { /* table does not already exist (do nothing) */ }
|
||||
|
||||
table = unmarshallTable(n, table);
|
||||
table.setContainer(rom);
|
||||
rom.addTable(table);
|
||||
try {
|
||||
table = unmarshallTable(n, table);
|
||||
table.setContainer(rom);
|
||||
rom.addTable(table);
|
||||
} catch (TableIsOmittedException ex) { // table is not supported in inherited def (skip)
|
||||
rom.removeTable(table.getName());
|
||||
}
|
||||
|
||||
} else { /* unexpected element in Rom (skip)*/ }
|
||||
} else { /* unexpected node-type in Rom (skip)*/ }
|
||||
|
@ -80,25 +83,29 @@ public class DOMRomUnmarshaller {
|
|||
Node n;
|
||||
NodeList nodes = rootNode.getChildNodes();
|
||||
|
||||
for (int i = 0; i < nodes.getLength(); i++) {
|
||||
n = nodes.item(i);
|
||||
try {
|
||||
for (int i = 0; i < nodes.getLength(); i++) {
|
||||
n = nodes.item(i);
|
||||
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equalsIgnoreCase("rom")) {
|
||||
Node n2;
|
||||
NodeList nodes2 = n.getChildNodes();
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equalsIgnoreCase("rom")) {
|
||||
Node n2;
|
||||
NodeList nodes2 = n.getChildNodes();
|
||||
|
||||
for (int z = 0; z < nodes2.getLength(); z++) {
|
||||
n2 = nodes2.item(z);
|
||||
if (n2.getNodeType() == Node.ELEMENT_NODE && n2.getNodeName().equalsIgnoreCase("romid")) {
|
||||
for (int z = 0; z < nodes2.getLength(); z++) {
|
||||
n2 = nodes2.item(z);
|
||||
if (n2.getNodeType() == Node.ELEMENT_NODE && n2.getNodeName().equalsIgnoreCase("romid")) {
|
||||
|
||||
RomID romID = unmarshallRomID(n2, new RomID());
|
||||
if (romID.getXmlid().equalsIgnoreCase(xmlID)) {
|
||||
Rom returnrom = unmarshallRom(n, rom);
|
||||
return returnrom;
|
||||
RomID romID = unmarshallRomID(n2, new RomID());
|
||||
if (romID.getXmlid().equalsIgnoreCase(xmlID)) {
|
||||
Rom returnrom = unmarshallRom(n, rom);
|
||||
return returnrom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (StackOverflowError ex) {
|
||||
throw new StackOverflowError();
|
||||
}
|
||||
throw new RomNotFoundException();
|
||||
}
|
||||
|
@ -149,7 +156,11 @@ public class DOMRomUnmarshaller {
|
|||
return romID;
|
||||
}
|
||||
|
||||
private Table unmarshallTable(Node tableNode, Table table) throws XMLParseException {
|
||||
private Table unmarshallTable(Node tableNode, Table table) throws XMLParseException, TableIsOmittedException {
|
||||
|
||||
if (unmarshallAttribute(tableNode, "omit", "false").equalsIgnoreCase("true")) {
|
||||
throw new TableIsOmittedException();
|
||||
}
|
||||
|
||||
try {
|
||||
if (table.getType() < 1) { }
|
||||
|
|
|
@ -21,7 +21,8 @@ public abstract class RomAttributeParser {
|
|||
}
|
||||
|
||||
public static int parseHexString(String input) {
|
||||
if (input.length() > 2 && input.substring(0,2).equalsIgnoreCase("0x")) {
|
||||
if (input.equals("0")) return 0;
|
||||
else if (input.length() > 2 && input.substring(0,2).equalsIgnoreCase("0x")) {
|
||||
return Integer.parseInt(input.substring(2), 16);
|
||||
} else {
|
||||
return Integer.parseInt(input, 16);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
package Enginuity.XML;
|
||||
|
||||
public class TableIsOmittedException extends Exception {
|
||||
|
||||
public TableIsOmittedException() { }
|
||||
}
|
Loading…
Reference in New Issue