Skip to content

Add camera switching helper dialog#2577

Merged
rafaellehmkuhl merged 4 commits intobluerobotics:masterfrom
rafaellehmkuhl:add-camera-switching-helper-dialog
Apr 15, 2026
Merged

Add camera switching helper dialog#2577
rafaellehmkuhl merged 4 commits intobluerobotics:masterfrom
rafaellehmkuhl:add-camera-switching-helper-dialog

Conversation

@rafaellehmkuhl
Copy link
Copy Markdown
Member

This PR implements a new assistant dialog that helps users that are switching from one camera to another (e.g.: from an old regular USB camera to the new and only RadCam).

During startup, it checks if a stream that is being used by one or more widgets is not available anymore. If it finds this situation, it then checks if there's an available stream that is not being used by any widget. If it finds this case, and 15 seconds pass (to account for connection delays), it shows the following dialog:

image

With the click of a button all widgets that were connected to the old unavailable stream will be reconnected to the new available stream.

To accomplish that, I also had to fix some reconnection issues that were afflicting both the MiniVideoRecorder and VideoPlayer widgets.

Closes #2554

When the selected stream becomes unavailable, the MiniVideoRecorder now
reassigns to a renamed or first available stream, matching VideoPlayer.
When the CameraReplacementDialog updates a widget's stream option,
the widget now picks it up immediately and reconnects to the correct
stream instead of requiring a reload.
Adds a direct check in the polling interval that detects when
internalStreamName was changed externally (e.g. by the camera
replacement dialog) and syncs the local nameSelectedStream ref.
Detects when a widget's stream goes unavailable and a new unused stream
appears, then offers the user a one-click replacement to migrate all
affected widgets to the new stream.
Copy link
Copy Markdown
Contributor

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

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

I don't expect I'll be able to test in a reasonable timeframe, but feature looks great, and code seems reasonable.

I have a slight concern that the text description is a bit long, but also can't immediately think of something more concise that still conveys the meaning in a friendly way, so I'm ok with this, especially as a starting point.

Did you forget to check the snapshot widgets as video stream consumers?

@rafaellehmkuhl
Copy link
Copy Markdown
Member Author

I don't expect I'll be able to test in a reasonable timeframe, but feature looks great, and code seems reasonable.

I have a slight concern that the text description is a bit long, but also can't immediately think of something more concise that still conveys the meaning in a friendly way, so I'm ok with this, especially as a starting point.

Did you forget to check the snapshot widgets as video stream consumers?

Didn't forget, just waiting for the new behavior of the snapshot widget to be merged, so I can reproduce the logic there without having to rebase stuff 😅

@rafaellehmkuhl rafaellehmkuhl merged commit 6bfaf41 into bluerobotics:master Apr 15, 2026
10 of 11 checks passed
@rafaellehmkuhl rafaellehmkuhl deleted the add-camera-switching-helper-dialog branch April 15, 2026 01:35
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.

Open help dialog when user replaces a camera

2 participants