Preliminary support to RT mode

This commit is contained in:
gac-S_Changer
2023-04-26 10:58:52 +02:00
parent a904eac8eb
commit 423a563488
5 changed files with 3136 additions and 3113 deletions

View File

@@ -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);
}
}
}
}