sleep(current.getSleepTime());
}
for(int i=0; i<actuatorCommandListeners.size(); i++){
((ActuatorCommandListener)
actuatorCommandListeners.elementAt(i)).commandDidComplete(
new ActuatorEvent(this,
ActuatorEvent.COMMAND_COMPLETE,
this.current));
}
}
}
//minimum loop sleep
sleep(SLEEP_INTERVAL);
}catch(Exception e){
//On exception kill this actuator, as it is
//unsafe to continue operation
for(int i=0; i<actuatorCommandListeners.size(); i++){
((ActuatorCommandListener)
actuatorCommandListeners.elementAt(i)).commandDidComplete(
new ActuatorEvent(this,
ActuatorEvent.COMMAND_FAILED,
this.current));
}
e.printStackTrace();
stopActuator();