diff --git a/devices/led_ctrl_1.properties b/devices/led_ctrl_1.properties index 032cfaa..5927139 100644 --- a/devices/led_ctrl_1.properties +++ b/devices/led_ctrl_1.properties @@ -1,4 +1,4 @@ -#Thu Sep 20 09:25:00 CEST 2018 +#Mon Sep 24 16:01:28 CEST 2018 maxValue=1.0 minValue=0.0 offset=0.0 diff --git a/devices/led_ctrl_2.properties b/devices/led_ctrl_2.properties index 032cfaa..5927139 100644 --- a/devices/led_ctrl_2.properties +++ b/devices/led_ctrl_2.properties @@ -1,4 +1,4 @@ -#Thu Sep 20 09:25:00 CEST 2018 +#Mon Sep 24 16:01:28 CEST 2018 maxValue=1.0 minValue=0.0 offset=0.0 diff --git a/devices/led_ctrl_3.properties b/devices/led_ctrl_3.properties index 032cfaa..5927139 100644 --- a/devices/led_ctrl_3.properties +++ b/devices/led_ctrl_3.properties @@ -1,4 +1,4 @@ -#Thu Sep 20 09:25:00 CEST 2018 +#Mon Sep 24 16:01:28 CEST 2018 maxValue=1.0 minValue=0.0 offset=0.0 diff --git a/plugins/MXSC-1.10.0.jar b/plugins/MXSC-1.10.0.jar index ff1ffba..d19a2d9 100644 Binary files a/plugins/MXSC-1.10.0.jar and b/plugins/MXSC-1.10.0.jar differ diff --git a/plugins/PuckDetectionPanel.form b/plugins/PuckDetectionPanel.form index ddf0eb7..9d644a4 100644 --- a/plugins/PuckDetectionPanel.form +++ b/plugins/PuckDetectionPanel.form @@ -141,8 +141,8 @@ - - + +
diff --git a/plugins/PuckDetectionPanel.java b/plugins/PuckDetectionPanel.java index fe33ec5..e36c4db 100644 --- a/plugins/PuckDetectionPanel.java +++ b/plugins/PuckDetectionPanel.java @@ -1,6 +1,7 @@ import ch.psi.mxsc.Puck; import ch.psi.mxsc.PuckDetection; import ch.psi.mxsc.PuckState; +import ch.psi.mxsc.PuckState.SwitchState; import ch.psi.pshell.core.Context; import ch.psi.pshell.swing.DevicePanel; import ch.psi.utils.swing.SwingUtils; @@ -36,8 +37,8 @@ public class PuckDetectionPanel extends DevicePanel { int id = puck.getIndex() + 1; PuckState state = getDevice().getPuckState(id); table.getModel().setValueAt(state.online, row, 1); - table.getModel().setValueAt(state.mecSwitch, row, 2); - table.getModel().setValueAt(state.indSwitch, row, 3); + table.getModel().setValueAt((SwitchState.Off == state.mecSwitch) ? "" : String.valueOf(state.mecSwitch), row, 2); + table.getModel().setValueAt((SwitchState.Off == state.indSwitch) ? "" : String.valueOf(state.indSwitch), row, 3); table.getModel().setValueAt(puck.getDetection() == null ? "" : puck.getDetection(), row, 4); table.getModel().setValueAt(puck.getPuckType() == null ? "" : puck.getPuckType(), row, 5); } catch (Exception ex) { @@ -169,7 +170,7 @@ public class PuckDetectionPanel extends DevicePanel { } ) { Class[] types = new Class [] { - java.lang.String.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.String.class, java.lang.String.class + java.lang.String.class, java.lang.Boolean.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class }; boolean[] canEdit = new boolean [] { false, false, false, false, false, false diff --git a/script/devices/RobotSC.py b/script/devices/RobotSC.py index fb61510..020cd02 100644 --- a/script/devices/RobotSC.py +++ b/script/devices/RobotSC.py @@ -55,12 +55,14 @@ class RobotSC(RobotTCP): self.assert_dewar() def put_gonio(self): - self.start_task('putGonio') + pin_offset = get_pin_offset() + self.start_task('putGonio', pin_offset) self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_gonio() def get_gonio(self): - self.start_task('getGonio') + pin_offset = get_pin_offset() + self.start_task('getGonio', pin_offset) self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_gonio() diff --git a/script/local.py b/script/local.py index 1d173b2..539ae24 100644 --- a/script/local.py +++ b/script/local.py @@ -238,6 +238,25 @@ def is_puck_loading(): feedback_psys_safety.take() == False and \ not guiding_tool_park.read() +def set_pin_offset(val): + if abs(val) >5: + raise Exception("Invlid pin offset: " + str(val)) + try: + set_setting("pin_offset",float(val)) + except: + log("Error setting pin offset: " + str(sys.exc_info()[1]), False) + +def get_pin_offset(): + try: + ret = float(get_setting("pin_offset")) + if abs(ret) >5: + raise Exception("Invlid configured pin offset: " + str(ret)) + return ret + except: + log("Error getting pin offset: " + str(sys.exc_info()[1]), False) + return 0.0 + + update() add_device(Controller.getInstance().basePlate, True) diff --git a/script/test/SampleDataInput_Dominik.py b/script/test/SampleDataInput_Dominik.py index c97507c..8ff4ae7 100644 --- a/script/test/SampleDataInput_Dominik.py +++ b/script/test/SampleDataInput_Dominik.py @@ -6,7 +6,7 @@ test_sample_data = [ \ { "userName": USER_NAME, \ "dewarName": DEWAR_NAME, \ "puckName": "Isabelle Chip", \ - "puckBarcode": "PuckWithChips", \ + "puckBarcode": "CA00CF1471", \ "puckType": "unipuck", \ "puckAddress": "",\ "sampleName": "flat_Base_Pin_1", \ @@ -18,7 +18,7 @@ test_sample_data = [ \ { "userName": USER_NAME, \ "dewarName": DEWAR_NAME, \ "puckName": "Isabelle Chip", \ - "puckBarcode": "PuckWithChips", \ + "puckBarcode": "CA00CF1471", \ "puckType": "unipuck", \ "puckAddress": "",\ "sampleName": "flat_Base_Pin_2", \ @@ -30,7 +30,7 @@ test_sample_data = [ \ { "userName": USER_NAME, \ "dewarName": DEWAR_NAME, \ "puckName": "Isabelle Chip", \ - "puckBarcode": "PuckWithChips", \ + "puckBarcode": "CA00CF1471", \ "puckType": "unipuck", \ "puckAddress": "",\ "sampleName": "regular_Base_Pin_1", \ @@ -42,7 +42,7 @@ test_sample_data = [ \ { "userName": USER_NAME, \ "dewarName": DEWAR_NAME, \ "puckName": "Isabelle Chip", \ - "puckBarcode": "PuckWithChips", \ + "puckBarcode": "CA00CF1471", \ "puckType": "unipuck", \ "puckAddress": "",\ "sampleName": "regular_Base_Pin_2", \