Skip to content

thorlabs_mcls1: add OS-based backend selection (Windows UART lib / Linux serial)#441

Merged
RemiSoummer merged 8 commits into
developfrom
mcls1_serial_service
Jun 1, 2026
Merged

thorlabs_mcls1: add OS-based backend selection (Windows UART lib / Linux serial)#441
RemiSoummer merged 8 commits into
developfrom
mcls1_serial_service

Conversation

@ivalaginja

@ivalaginja ivalaginja commented May 8, 2026

Copy link
Copy Markdown
Collaborator

This PR updates the ThorlabsMcls1 service to support both Windows and Linux/macOS communication paths while keeping a single service implementation.

The MCLS1 service previously depended on the Thorlabs UART library flow, which is Windows-specific. We need the same service to work on non-Windows systems using direct serial communication (e.g., Linux).

I added runtime backend selection based on OS, and refactored all necessary methods to call one or the other, depending on the backend.

Backward-compatible for existing Windows setups (same UART library behavior).
Adds non-Windows support without introducing a second service class.

TODO

  • Test on Linux machine (capsule)
  • Test on Windows machine

@ivalaginja ivalaginja self-assigned this May 8, 2026
@ivalaginja ivalaginja added the hardware Integrate new hardware label May 8, 2026
@lanemeier7

Copy link
Copy Markdown
Collaborator

@ivalaginja I also recently used an mcls1 and made some changes to work directly with pyserial nearly the same time you started working this. I can test your changes on Windows

@RemiSoummer RemiSoummer force-pushed the mcls1_serial_service branch from 39eaca8 to 8e5028d Compare June 1, 2026 20:43
@RemiSoummer RemiSoummer marked this pull request as ready for review June 1, 2026 21:39

@RemiSoummer RemiSoummer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good and tested on both linux and windows

@RemiSoummer RemiSoummer enabled auto-merge June 1, 2026 21:42
@RemiSoummer RemiSoummer merged commit d73ad0b into develop Jun 1, 2026
12 checks passed
@RemiSoummer RemiSoummer deleted the mcls1_serial_service branch June 1, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hardware Integrate new hardware

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants