mirror of https://github.com/rusefi/RomRaider.git
Cleanup
This commit is contained in:
parent
6b7fb4765b
commit
9736e3eeeb
|
@ -64,7 +64,6 @@ public class DataCell implements Serializable {
|
||||||
this.table = table;
|
this.table = table;
|
||||||
this.rom = rom;
|
this.rom = rom;
|
||||||
setBitMask(table.getBitMask()); //Take the global bitmask first
|
setBitMask(table.getBitMask()); //Take the global bitmask first
|
||||||
calcValueRange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataCell(Table table, String staticText, Rom rom) {
|
public DataCell(Table table, String staticText, Rom rom) {
|
||||||
|
@ -130,14 +129,12 @@ public class DataCell implements Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
if(bitMask == 0) {
|
if(bitMask == 0) {
|
||||||
maxAllowedBin = (Math.pow(256, table.getStorageType()) - 1);
|
maxAllowedBin = (Math.pow(256, table.getStorageType()) - 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
maxAllowedBin =(int)(Math.pow(2,ByteUtil.lengthOfMask(bitMask)) - 1);
|
maxAllowedBin =(int)(Math.pow(2,ByteUtil.lengthOfMask(bitMask)) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
minAllowedBin = 0.0;
|
minAllowedBin = 0.0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2021 RomRaider.com
|
* Copyright (C) 2006-2022 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -68,7 +68,9 @@ public class TableBitwiseSwitch extends TableSwitch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPresetValues(String name, String bitPos) {
|
public void setPresetValues(String name, String bitPos) {
|
||||||
|
if (bitPos != null && bitPos.length() > 0) {
|
||||||
bits.add(Integer.parseInt(bitPos));
|
bits.add(Integer.parseInt(bitPos));
|
||||||
super.setPresetValues(name, "1", bits.size() - 1);
|
super.setPresetValues(name, "1", bits.size() - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2021 RomRaider.com
|
* Copyright (C) 2006-2022 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -299,7 +299,7 @@ public class TableScaleUnmarshaller {
|
||||||
} else if (n.getNodeName().equalsIgnoreCase("bit")) {
|
} else if (n.getNodeName().equalsIgnoreCase("bit")) {
|
||||||
table.setPresetValues(
|
table.setPresetValues(
|
||||||
unmarshallAttribute(n, "name", ""),
|
unmarshallAttribute(n, "name", ""),
|
||||||
unmarshallAttribute(n, "position", "0"));
|
unmarshallAttribute(n, "position", ""));
|
||||||
|
|
||||||
} else { /* unexpected element in Table (skip) */
|
} else { /* unexpected element in Table (skip) */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue