Service mode and no cover detection
This commit is contained in:
@@ -13,7 +13,6 @@ 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.ReadbackDevice;
|
||||
import ch.psi.pshell.ui.App;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.Arr;
|
||||
@@ -436,6 +435,24 @@ public class Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public Boolean isServiceMode() {
|
||||
try {
|
||||
return getMainFrame().eval("is_service_mode()", true).equals(true);
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setServiceMode(boolean value){
|
||||
try{
|
||||
String state = value ? "True" : "False";
|
||||
getMainFrame().evalAsync("set_service_mode(" + state + ")");
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Boolean isBarcodeReaderScanPucks() {
|
||||
try {
|
||||
return getMainFrame().eval("is_barcode_reader_scan_pucks()", true).equals(true);
|
||||
|
||||
Reference in New Issue
Block a user