Skip to content

Conversation

@nicost
Copy link
Member

@nicost nicost commented Dec 24, 2025

let them signal whether they use callbacks to update the UI about their position.

Second part of issue #806. I believe this will be useful once implemented (for instance, the Stage control window, Snap-on-Move, and the HCS plugin could all make use of it), but can easily be convinced otherwise.

let them signal whether they use callbacks to update the UI
about their position.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds functions to Stage and XYStage device interfaces to allow them to signal whether they use callbacks to update the UI about their position. This is the second part of issue #806 and will enable UI components (Stage control window, Snap-on-Move, HCS plugin) to determine whether polling is necessary.

Key Changes:

  • Increments device interface version from 74 to 75
  • Adds pure virtual functions UsesOnStagePositionChanged() and UsesOnXYStagePositionChanged() to respective interfaces
  • Provides default implementations (returning false) in CStageBase and CXYStageBase classes

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
MMDevice/MMDevice.h Adds pure virtual functions to Stage and XYStage interfaces with documentation; increments interface version
MMDevice/DeviceBase.h Provides default implementations returning false for both base classes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

nicost and others added 5 commits December 24, 2025 14:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@nicost nicost marked this pull request as ready for review December 24, 2025 22:48
@nicost nicost requested a review from marktsuchida December 24, 2025 22:48
Comment on lines 609 to 613
* in which case the UI code should use polling. This function signals whether
* the device adapters uses callbacks, so that the UI knows it does not need
* to poll this device
*/
virtual bool UsesOnStagePositionChanged() = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious: how do you intend to determine from the UI whether a specific device returns True on this... does it imply that you intend to add another public method to MMCore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good point! Completely forgot about that part. Added now. Please feel free to suggest better function names.

isXYStageUsingCallbacks functions.  Bump MMCore version to 11.12.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants