Skip to content

Support the Holoeye SLM Display SDK 4 besides the SDK 3 - #9

Merged
seb5g merged 4 commits into
5.0.xfrom
feature/sdk3_and_sdk4
Oct 30, 2026
Merged

seb5g merged 4 commits into
5.0.xfrom
feature/sdk3_and_sdk4

Conversation

@seb5g

@seb5g seb5g commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • New SDK version setting (auto, 3, 4). auto uses 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 3 SLMInstance used by the plugins (open, close, errorString, width_px, height_px, showData, showPhasevalues, utilsSLMPreviewShow).
    • The preview window is not opened at initialization (HEDS.SLM.Init(openPreview=False)); the Show Preview? setting opens it with preview().open()/close().
    • Grey levels use showImageData, phases in radians use showPhaseData(phase_unit=2π).
  • Environment variables: SDK 3 as before (HEDS_*_PYTHON_MODULES, the last one sorted); SDK 4 and newer through HEDS_<major>_<minor>_PYTHON (e.g. HEDS_4_0_PYTHON, the name changes with the SDK version, the most recent one is used; its api/python and examples folders are added to the python path). The package no longer raises IndexError at import when none is set.
  • The base plugin no longer imports the SDK 3 at module level; __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 HEDS module sources of the SDK 4. Not tested on a real Holoeye SLM yet.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CAhZwmbyCSpSgfTyicUxuS

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
@seb5g
seb5g marked this pull request as ready for review October 30, 2026 09:19
@seb5g
seb5g merged commit 9d587ac into 5.0.x Oct 30, 2026
7 checks passed
@seb5g
seb5g deleted the feature/sdk3_and_sdk4 branch October 30, 2026 09:20
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