diff --git a/DeviceAdapters/ASITiger/ASIXYStage.cpp b/DeviceAdapters/ASITiger/ASIXYStage.cpp index 8634f3a35..55c928718 100644 --- a/DeviceAdapters/ASITiger/ASIXYStage.cpp +++ b/DeviceAdapters/ASITiger/ASIXYStage.cpp @@ -529,6 +529,14 @@ int CXYStage::GetPositionSteps(long& x, long& y) // return DEVICE_OK; //} +int CXYStage::SetPositionUm(double x, double y) +{ + int ret = CXYStageBase::SetPositionUm(x, y); + if (ret == DEVICE_OK) + OnXYStagePositionChanged(x, y); + return ret; +} + int CXYStage::SetPositionSteps(long x, long y) { std::ostringstream command; diff --git a/DeviceAdapters/ASITiger/ASIXYStage.h b/DeviceAdapters/ASITiger/ASIXYStage.h index 02be1b3b3..a90502af0 100644 --- a/DeviceAdapters/ASITiger/ASIXYStage.h +++ b/DeviceAdapters/ASITiger/ASIXYStage.h @@ -69,6 +69,8 @@ class CXYStage : public ASIPeripheralBase int AddToXYStageSequence(double positionX, double positionY); int SendXYStageSequence(); + int SetPositionUm(double x, double y); + // leave default implementation which call corresponding "Steps" functions // while accounting for mirroring and so forth // int SetPositionUm(double x, double y); diff --git a/DeviceAdapters/DemoCamera/DemoStages.cpp b/DeviceAdapters/DemoCamera/DemoStages.cpp index 47a03532f..1076a8829 100644 --- a/DeviceAdapters/DemoCamera/DemoStages.cpp +++ b/DeviceAdapters/DemoCamera/DemoStages.cpp @@ -371,8 +371,8 @@ int CDemoXYStage::SetPositionSteps(long x, long y) moveStartTime_ = currentTime; timeOutTimer_ = new MM::TimeoutMs(currentTime, moveDuration_ms_); - // Optionally, notify listeners of the starting position (as an acknowledgement) - int ret = OnXYStagePositionChanged(startPosX_um_, startPosY_um_); + // Notify listeners of the target position. + int ret = OnXYStagePositionChanged(targetPosX_um_, targetPosY_um_); if (ret != DEVICE_OK) return ret;