ServiceLink: Updates, Debug removal

thobaben_serialize
Harald Wolff 2014-09-09 23:51:42 +02:00
parent 68a72f0b71
commit 6435ba0596
2 changed files with 6 additions and 3 deletions

View File

@ -130,7 +130,7 @@ public class ServiceLink {
if (chksum != ChkSum.chksum(rxbuffer, 0, bb.position() - 2))
throw new ServiceLinkException();
System.err.println(String.format("recv(): %d.%d:%d = 0x%08x",achse,knoten,register,bb.getInt(5)));
//System.err.println(String.format("recv(): %d.%d:%d = 0x%08x",achse,knoten,register,bb.getInt(5)));
} catch (IOException e) {
getSerialPort().close();
@ -185,7 +185,7 @@ public class ServiceLink {
{
this.retries = 3;
this.serialPort = serialPort;
this.serialPort.setTimeout(250);
this.serialPort.setTimeout(500);
this.serviceRegisterCache = new ServiceRegisterCache(this);
this.requestTime = new Smoother();
this.requestTime.setTn(16);

View File

@ -53,7 +53,10 @@ public class IntegerRegisterEditor extends JPanel implements ServiceRegisterCont
@Override
public void readValue() {
tfValue.setText(this.serviceRegister.readIntegerValue().toString());
Integer i = this.serviceRegister.readIntegerValue();
if ( i == null )
i = 0;
tfValue.setText(i.toString());
}
@Override