mirror of https://github.com/rusefi/RomRaider.git
code cleanup
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@632 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
d158757298
commit
c6cd52ea85
|
@ -25,7 +25,9 @@ import static enginuity.util.ByteUtil.asByte;
|
||||||
import static enginuity.util.ByteUtil.asInt;
|
import static enginuity.util.ByteUtil.asInt;
|
||||||
|
|
||||||
public final class SSMChecksumCalculator {
|
public final class SSMChecksumCalculator {
|
||||||
|
|
||||||
private SSMChecksumCalculator() {
|
private SSMChecksumCalculator() {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte calculateChecksum(byte[] bytes) {
|
public static byte calculateChecksum(byte[] bytes) {
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
package enginuity.io.protocol;
|
package enginuity.io.protocol;
|
||||||
|
|
||||||
import enginuity.io.connection.ConnectionProperties;
|
|
||||||
import static enginuity.io.protocol.SSMChecksumCalculator.calculateChecksum;
|
import static enginuity.io.protocol.SSMChecksumCalculator.calculateChecksum;
|
||||||
import static enginuity.io.protocol.SSMResponseProcessor.extractResponseData;
|
import static enginuity.io.protocol.SSMResponseProcessor.extractResponseData;
|
||||||
import static enginuity.io.protocol.SSMResponseProcessor.filterRequestFromResponse;
|
import static enginuity.io.protocol.SSMResponseProcessor.filterRequestFromResponse;
|
||||||
|
@ -89,35 +88,6 @@ public final class SSMProtocol implements Protocol {
|
||||||
return new SSMEcuInit(responseData);
|
return new SSMEcuInit(responseData);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConnectionProperties getConnectionProperties() {
|
|
||||||
return new ConnectionProperties() {
|
|
||||||
|
|
||||||
public int getBaudRate() {
|
|
||||||
return 4800;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getDataBits() {
|
|
||||||
return 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getStopBits() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getParity() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getConnectTimeout() {
|
|
||||||
return 2000;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSendTimeout() {
|
|
||||||
return 55;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: Clean up SSM request building... pretty ugly at the moment..
|
//TODO: Clean up SSM request building... pretty ugly at the moment..
|
||||||
private byte[] buildRequest(byte command, boolean padContent, byte[]... content) {
|
private byte[] buildRequest(byte command, boolean padContent, byte[]... content) {
|
||||||
byte[] data = new byte[0];
|
byte[] data = new byte[0];
|
||||||
|
|
|
@ -36,7 +36,9 @@ import static enginuity.util.ParamChecker.checkNotNull;
|
||||||
import static enginuity.util.ParamChecker.checkNotNullOrEmpty;
|
import static enginuity.util.ParamChecker.checkNotNullOrEmpty;
|
||||||
|
|
||||||
public final class SSMResponseProcessor {
|
public final class SSMResponseProcessor {
|
||||||
|
|
||||||
private SSMResponseProcessor() {
|
private SSMResponseProcessor() {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] filterRequestFromResponse(byte[] request, byte[] response) {
|
public static byte[] filterRequestFromResponse(byte[] request, byte[] response) {
|
||||||
|
|
Loading…
Reference in New Issue