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.rom = rom;
|
||||
setBitMask(table.getBitMask()); //Take the global bitmask first
|
||||
calcValueRange();
|
||||
}
|
||||
|
||||
public DataCell(Table table, String staticText, Rom rom) {
|
||||
|
@ -130,14 +129,12 @@ public class DataCell implements Serializable {
|
|||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if(bitMask == 0) {
|
||||
maxAllowedBin = (Math.pow(256, table.getStorageType()) - 1);
|
||||
}
|
||||
else {
|
||||
maxAllowedBin =(int)(Math.pow(2,ByteUtil.lengthOfMask(bitMask)) - 1);
|
||||
}
|
||||
|
||||
minAllowedBin = 0.0;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -68,7 +68,9 @@ public class TableBitwiseSwitch extends TableSwitch {
|
|||
|
||||
@Override
|
||||
public void setPresetValues(String name, String bitPos) {
|
||||
bits.add(Integer.parseInt(bitPos));
|
||||
super.setPresetValues(name, "1", bits.size() - 1);
|
||||
if (bitPos != null && bitPos.length() > 0) {
|
||||
bits.add(Integer.parseInt(bitPos));
|
||||
super.setPresetValues(name, "1", bits.size() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* 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
|
||||
* 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")) {
|
||||
table.setPresetValues(
|
||||
unmarshallAttribute(n, "name", ""),
|
||||
unmarshallAttribute(n, "position", "0"));
|
||||
unmarshallAttribute(n, "position", ""));
|
||||
|
||||
} else { /* unexpected element in Table (skip) */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue