logger ecu init stuff updated

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@405 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
kascade 2007-01-04 11:46:31 +00:00
parent 28c29fd88d
commit 820583c793
1 changed files with 2 additions and 4 deletions

View File

@ -85,7 +85,9 @@ public final class QueryManagerImpl implements QueryManager {
try {
stop = false;
while (!stop) {
notifyConnecting();
if (doEcuInit()) {
notifyReading();
runLogger();
} else {
ThreadUtil.sleep(5000L);
@ -101,11 +103,9 @@ public final class QueryManagerImpl implements QueryManager {
}
private boolean doEcuInit() {
notifyConnecting();
Protocol protocol = ProtocolFactory.getInstance().getProtocol(settings.getLoggerProtocol());
EcuConnection ecuConnection = new EcuConnectionImpl(protocol.getConnectionProperties(), settings.getLoggerPort());
try {
notifyReading();
messageListener.reportMessage("Sending ECU Init...");
byte[] response = ecuConnection.send(protocol.constructEcuInitRequest());
System.out.println("Ecu Init response = " + asHex(response));
@ -127,13 +127,11 @@ public final class QueryManagerImpl implements QueryManager {
}
private void runLogger() {
notifyConnecting();
TransmissionManager txManager = new TransmissionManagerImpl(settings);
long start = System.currentTimeMillis();
int count = 0;
try {
txManager.start();
notifyReading();
while (!stop) {
updateQueryList();
if (queryMap.isEmpty()) {