Beispiel #1
0
 private void refreshOneAxisStagePositions() {
   for (Devices.Keys devKey : Devices.STAGES1D) {
     String mmDevice = devices_.getMMDevice(devKey);
     if (mmDevice == null) { // skip devices not set in devices tab
       oneAxisDrivePositions_.put(devKey, null);
       continue;
     }
     try {
       if (devices_.is1DStage(devKey)) {
         double pt = core_.getPosition(mmDevice);
         oneAxisDrivePositions_.put(devKey, pt);
       }
     } catch (Exception ex) {
       ReportingUtils.logMessage("Problem getting position of " + mmDevice);
     }
   }
 }
Beispiel #2
0
 private void refreshTwoAxisStagePositions() {
   for (Devices.Keys devKey : Devices.STAGES2D) {
     String mmDevice = devices_.getMMDevice(devKey);
     if (mmDevice == null) { // skip devices not set in devices tab
       twoAxisDrivePositions_.put(devKey, null);
       continue;
     }
     Point2D.Double pt;
     try {
       if (devices_.isXYStage(devKey)) {
         pt = core_.getXYStagePosition(mmDevice);
       } else if (devices_.isGalvo(devKey)) {
         pt = core_.getGalvoPosition(mmDevice);
       } else {
         pt = new Point2D.Double();
       }
       twoAxisDrivePositions_.put(devKey, pt);
     } catch (Exception ex) {
       ReportingUtils.logMessage("Problem getting position of " + mmDevice);
     }
   }
 }