Repository navigation
Support the Holoeye SLM Display SDK 4 besides the SDK 3 - #9
Merged
Merged
Conversation
The SDK is selected from the plugin settings (auto: SDK 3 if installed, else SDK 4), imported only when used. The SDK 4 is wrapped with the interface of the SDK 3 SLMInstance, without opening the preview window at initialization. The package no longer fails at import when no SDK environment variable is set. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
…ey levels) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
…ersion Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS
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.
Summary
SDK versionsetting (auto,3,4).autouses the SDK 4 if it is importable (more recent and better maintained), else the SDK 3. The SDKs are imported only when selected.hardware/sdk4.py: adapter of the SDK 4 (HEDS) with the interface of the SDK 3SLMInstanceused by the plugins (open,close,errorString,width_px,height_px,showData,showPhasevalues,utilsSLMPreviewShow).HEDS.SLM.Init(openPreview=False)); theShow Preview?setting opens it withpreview().open()/close().showImageData, phases in radians useshowPhaseData(phase_unit=2π).HEDS_*_PYTHON_MODULES, the last one sorted); SDK 4 and newer throughHEDS_<major>_<minor>_PYTHON(e.g.HEDS_4_0_PYTHON, the name changes with the SDK version, the most recent one is used; itsapi/pythonandexamplesfolders are added to the python path). The package no longer raisesIndexErrorat import when none is set.__version__added to the package.Tested
Unit tests with fake SDK modules (selection, SDK 4 adapter, plugin with SDK 4, mock plugin, environment variables). The adapter was checked against the
HEDSmodule sources of the SDK 4. Not tested on a real Holoeye SLM yet.🤖 Generated with Claude Code
https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS