mirror of https://github.com/rusefi/RomRaider.git
logger now uses ecu init response to determine loggable parameters
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@403 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
dadcf8bd88
commit
344987c59c
|
@ -181,7 +181,7 @@ public final class LoggerDefinitionHandler extends DefaultHandler {
|
||||||
ecuDataMap.put(param.getId(), param);
|
ecuDataMap.put(param.getId(), param);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (ecuByteIndex == null || ecuBit == null || isSupportedParameter(ecuByteIndex, ecuBit)) {
|
if (ecuByteIndex == null || ecuBit == null || ecuInit == null || isSupportedParameter(ecuInit, ecuByteIndex, ecuBit)) {
|
||||||
EcuParameter param = new EcuParameterImpl(id, name, desc, toArray(addressList), convertorList.toArray(new EcuDataConvertor[convertorList.size()]));
|
EcuParameter param = new EcuParameterImpl(id, name, desc, toArray(addressList), convertorList.toArray(new EcuDataConvertor[convertorList.size()]));
|
||||||
params.add(param);
|
params.add(param);
|
||||||
ecuDataMap.put(param.getId(), param);
|
ecuDataMap.put(param.getId(), param);
|
||||||
|
@ -206,7 +206,7 @@ public final class LoggerDefinitionHandler extends DefaultHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSupportedParameter(final String ecuByteIndex, final String ecuBit) {
|
private boolean isSupportedParameter(final EcuInit ecuInit, final String ecuByteIndex, final String ecuBit) {
|
||||||
byte[] bytes = new byte[1];
|
byte[] bytes = new byte[1];
|
||||||
System.arraycopy(ecuInit.getEcuInitBytes(), Integer.parseInt(ecuByteIndex), bytes, 0, 1);
|
System.arraycopy(ecuInit.getEcuInitBytes(), Integer.parseInt(ecuByteIndex), bytes, 0, 1);
|
||||||
return (bytes[0] & 1 << Integer.parseInt(ecuBit)) > 0;
|
return (bytes[0] & 1 << Integer.parseInt(ecuBit)) > 0;
|
||||||
|
|
Loading…
Reference in New Issue