MainPanel prototype
This commit is contained in:
@@ -9,6 +9,8 @@ import ch.psi.pshell.device.Device;
|
||||
import ch.psi.pshell.device.DeviceAdapter;
|
||||
import ch.psi.pshell.device.DeviceListener;
|
||||
import ch.psi.pshell.device.GenericDevice;
|
||||
import ch.psi.pshell.device.ProcessVariableBase;
|
||||
import ch.psi.pshell.device.ReadbackDevice;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.State;
|
||||
|
||||
@@ -28,7 +30,7 @@ public class Controller {
|
||||
static void createInstance(Panel mainFrame){
|
||||
instance = new Controller(mainFrame);
|
||||
}
|
||||
|
||||
|
||||
enum PuckSensorAccess{
|
||||
RaspberryPi,
|
||||
Esera;
|
||||
@@ -136,7 +138,16 @@ public class Controller {
|
||||
}
|
||||
|
||||
|
||||
public String getHexaposiPosition(){
|
||||
return (String) hexaposi.take();
|
||||
public String getHexiposiPosition(){
|
||||
return (String) ((ReadbackDevice)hexaposi).getReadback().take();
|
||||
}
|
||||
|
||||
public Boolean isLedRoomTemp(){
|
||||
try{
|
||||
return ((ProcessVariableBase)getMainFrame().getDevice("led_ctrl_1")).getConfig().maxValue <= 0.50;
|
||||
} catch (Exception ex){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user