WIP170315

master
Harald Wolff 2017-03-15 11:38:49 +01:00
parent 936fd74075
commit 5fcc6bc22a
4 changed files with 12 additions and 10 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.hwo"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.hwo.ui"/>
<classpathentry kind="output" path="bin"/>

View File

@ -1,11 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -70,12 +70,12 @@ public class ServiceLink implements NewSerialPortListener {
public ServiceLink(NewSerialPort serialPort)
{
this.requestTimeOut = 25;
this.requestTimeOut = 100;
this.serviceLinkListeners = new LinkedList<ServiceLinkListener>();
this.retries = 3;
this.serialPort = serialPort;
this.serialPort.setTimeOut(250);
this.serialPort.setTimeOut(25);
this.serialPort.addNewSerialPortListener(this);
this.serviceRegisterCache = new ServiceRegisterCache(this);
this.asynchronServiceLinkProvider = new AsynchronServiceLinkProvider(serviceRegisterCache);
@ -95,9 +95,9 @@ public class ServiceLink implements NewSerialPortListener {
private void _open(){
this.txWorker = new TxWorker();
this.rxWorker = new RxWorker();
this.serialPort.setTimeOut(25);
this.serialPort.open();
this.serialPort.setTimeOut(250);
this.txWorker.start();
this.rxWorker.start();
@ -426,6 +426,7 @@ public class ServiceLink implements NewSerialPortListener {
ServiceLink.this.close();
};
}
}
}

View File

@ -47,9 +47,10 @@ public class ServiceLinkV2Telegram extends ServiceLinkTelegram {
throw new RuntimeException(e);
}
if (bufferUsed != 8)
if (bufferUsed != 8){
//log(DEBUG,"ServiceLinkV2Telegram: bufferUsed == %d !!",bufferUsed);
return false;
}
log(DEBUGDETAIL,"RX BYTES: %s",ByteArrayHexlifier.byteArrayToString(buffer));
setAddress(new ServiceLinkAddress((buffer[1]>>4) & 0x0F, buffer[1] & 0x0F, (((int)buffer[2])&0xff) | (((int)buffer[3])<<8)&0xFF00 ));