fix SerialSocketServer when run without GUI
This commit is contained in:
parent
8f9ff51333
commit
60acf7de98
|
@ -644,6 +644,7 @@ public class SerialSocketServer extends VisPlugin implements MotePlugin {
|
||||||
private Timer updateTimer = new Timer(UPDATE_INTERVAL, new ActionListener() {
|
private Timer updateTimer = new Timer(UPDATE_INTERVAL, new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
if (Cooja.isVisualized()) {
|
||||||
if (closed) {
|
if (closed) {
|
||||||
updateTimer.stop();
|
updateTimer.stop();
|
||||||
return;
|
return;
|
||||||
|
@ -652,6 +653,7 @@ public class SerialSocketServer extends VisPlugin implements MotePlugin {
|
||||||
socketToMoteLabel.setText(inBytes + " bytes");
|
socketToMoteLabel.setText(inBytes + " bytes");
|
||||||
moteToSocketLabel.setText(outBytes + " bytes");
|
moteToSocketLabel.setText(outBytes + " bytes");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue