Skip to content

Make PrinterCamera client reconnectable.#173

Merged
ohmdelta merged 1 commit into
BambuTools:mainfrom
x746e:fix/reusable-camera-thread
Oct 17, 2025
Merged

Make PrinterCamera client reconnectable.#173
ohmdelta merged 1 commit into
BambuTools:mainfrom
x746e:fix/reusable-camera-thread

Conversation

@x746e

@x746e x746e commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

Description

Before this fix calling PrinterCamera.connect() after a .disconnect() would raise a RuntimeError: threads can only be started once, as PrinterCamera.__thread was created only once in PrinterCamera.__init__, and it looks like the Thread objects can not be reused.

Printer

All of them.

Type of change

Please delete options that are not relevant.

  • Bug fix (a non-breaking change that resolves an issue)

Before this fix calling `PrinterCamera.connect()` after a
`.disconnect()` would raise a `RuntimeError: threads can only be started
once`, as `PrinterCamera.__thread` was created only once in
`PrinterCamera.__init__`, and it looks like the `Thread` objects can not
be reused.

@ohmdelta ohmdelta 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.

Thanks

@ohmdelta ohmdelta merged commit 002e68d into BambuTools:main Oct 17, 2025
3 checks passed
@x746e x746e deleted the fix/reusable-camera-thread branch October 17, 2025 22:09
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