DemoCamera: Split large file DemoCamera into its individual classes.#809
Merged
marktsuchida merged 3 commits intomicro-manager:mainfrom Jan 8, 2026
Merged
DemoCamera: Split large file DemoCamera into its individual classes.#809marktsuchida merged 3 commits intomicro-manager:mainfrom
marktsuchida merged 3 commits intomicro-manager:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the DemoCamera device adapter by splitting a large monolithic file into separate files organized by device class. This improves code maintainability and organization.
Key Changes
- Split DemoCamera.cpp into 12 separate implementation files
- Added
static inlinequalifiers to functions in WriteCompactTiffRGB.h to prevent multiple definition errors - Updated build configuration files (Makefile.am, .vcxproj, .vcxproj.filters)
- Converted internal constants to extern declarations in header file
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| WriteCompactTiffRGB.h | Added static inline to prevent ODR violations when included in multiple translation units |
| Makefile.am | Added all new .cpp files to build sources |
| DemoStateDevices.cpp | Extracted state device implementations (filter wheel, state device, light path, objective turret) |
| DemoStages.cpp | Extracted stage implementations (Z stage, XY stage) |
| DemoShutter.cpp | Extracted shutter implementation |
| DemoPumps.cpp | Extracted pump device implementations |
| DemoMagnifier.cpp | Extracted magnifier device implementation |
| DemoImageProcessors.cpp | Extracted image processor implementations |
| DemoImageGeneration.cpp | Extracted image generation utility functions |
| DemoHub.cpp | Extracted hub device implementation |
| DemoGalvo.cpp | Extracted galvo device implementation |
| DemoDA.cpp | Extracted DA device implementation |
| DemoCameraModule.cpp | Extracted module initialization and device factory functions |
| DemoAutoFocus.cpp | Extracted autofocus device implementation |
| DemoCamera.h | Updated with extern declarations for constants |
| DemoCamera.cpp | Removed extracted code, added NoHubError definition |
| DemoCamera.vcxproj | Added new files to Visual Studio project |
| DemoCamera.vcxproj.filters | Added new files to VS filters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
Thanks for making this happen! I'll push a minor commit (sort files in Makefile.am) and merge. |
marktsuchida
approved these changes
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #312