Skip to content

MMDevice: Delete most deprecated functions#710

Merged
marktsuchida merged 2 commits intomicro-manager:mainfrom
marktsuchida:mmdevice-delete-deprecated
Aug 15, 2025
Merged

MMDevice: Delete most deprecated functions#710
marktsuchida merged 2 commits intomicro-manager:mainfrom
marktsuchida:mmdevice-delete-deprecated

Conversation

@marktsuchida
Copy link
Member

And remove corresponding CoreCallback implementations (and leftover functions from previously deprecated ones).

Closes #295.

This leaves a few deprecated functions in MMDevice because they are still used by a few device adapters:

MM_DEPRECATED(virtual int GetFocusPosition(double& pos)) = 0;
MM_DEPRECATED(virtual int GetXYPosition(double& x, double& y)) = 0;
MM_DEPRECATED(virtual MM::SignalIO* GetSignalIODevice(const MM::Device* caller, const char* deviceName)) = 0;

And remove corresponding CoreCallback implementations (and leftover
functions from previously depeted ones).
@marktsuchida marktsuchida merged commit d17fccc into micro-manager:main Aug 15, 2025
8 checks passed
@marktsuchida marktsuchida deleted the mmdevice-delete-deprecated branch August 15, 2025 19:16
marktsuchida added a commit to marktsuchida/mmCoreAndDevices that referenced this pull request Aug 16, 2025
In micro-manager#710 (0734eec) I changed the
signature of one of the two overloads of InsertImage() from

virtual int InsertImage(
    const Device* caller,
    const unsigned char* buf,
    unsigned width,
    unsigned height,
    unsigned byteDepth,
    const char* serializedMetadata,
    const bool doProcess = true) = 0;

to

virtual int InsertImage(
    const Device* caller,
    const unsigned char* buf,
    unsigned width,
    unsigned height,
    unsigned byteDepth,
    const char* serializedMetadata = nullptr,
    const bool doProcess = true) = 0;

(added nullptr default argument to serializedMetadata).

This was to support existing cameras that were calling the deleted
overload

MM_DEPRECATED(
virtual int InsertImage(
    const Device* caller,
    const unsigned char* buf,
    unsigned width,
    unsigned height,
    unsigned byteDepth,
    const Metadata* md = 0,
    const bool doProcess = true)) = 0;

without passing a non-null `md`.

But I forgot to ensure that the called implementations in CoreCallback
is checking for nullptr in this case (actually forgot to include the
relevant commit). So here is a fix.
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.

Investigate and maybe remove "Autofocus support" in CoreCallback

1 participant