Closedown
This commit is contained in:
@@ -11,7 +11,7 @@ import java.util.logging.Level;
|
||||
public class PuckDetection extends DeviceBase{
|
||||
public static final int PUCKS_NUMBER = 30;
|
||||
final String server;
|
||||
Chrono chrono;
|
||||
volatile Chrono chrono;
|
||||
|
||||
public PuckDetection(String name, String server){
|
||||
super(name);
|
||||
@@ -80,11 +80,15 @@ public class PuckDetection extends DeviceBase{
|
||||
watchDog = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (chrono.isTimeout(3000)){
|
||||
setState(State.Offline);
|
||||
for (PuckState puck:pucks){
|
||||
puck.clear();
|
||||
}
|
||||
try{
|
||||
if (chrono.isTimeout(3000)){
|
||||
setState(State.Offline);
|
||||
for (PuckState puck:pucks){
|
||||
puck.clear();
|
||||
}
|
||||
}
|
||||
} catch (Exception ex){
|
||||
getLogger().log(Level.INFO, null, ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user