Preliminary support to RT mode
This commit is contained in:
@@ -9,6 +9,7 @@ import ch.psi.pshell.device.DeviceAdapter;
|
||||
import ch.psi.pshell.device.DeviceListener;
|
||||
import ch.psi.pshell.device.GenericDevice;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.State;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -20,9 +21,24 @@ public class ControllerRT extends Controller{
|
||||
//basePlate = new BasePlate();
|
||||
basePlate.addListener(basePlateListener);
|
||||
setPuckLoading(false);
|
||||
for (PuckState ps : getPuckStates()){
|
||||
ps.set(1, 0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void onStateChange(State state, State former) {
|
||||
if ((state == State.Ready)&&(former==State.Initializing)) {
|
||||
PuckDetection puckDetection = this.getContext().getDevicePool().getByName("puckDetection", PuckDetection.class);
|
||||
if (puckDetection!=null){
|
||||
getMainFrame().removeDevice(puckDetection, true);
|
||||
}
|
||||
}
|
||||
super.onStateChange(state, former);
|
||||
}
|
||||
*/
|
||||
final DeviceListener basePlateListener = new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
@@ -43,5 +59,5 @@ public class ControllerRT extends Controller{
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(Controller.class.getName()).log(Level.WARNING, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user