Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RSDK-5526] - Make webcam driver detection debugging better #4794

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

hexbabe
Copy link
Member

@hexbabe hexbabe commented Feb 14, 2025

No description provided.

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Feb 14, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Feb 14, 2025
@@ -133,16 +134,22 @@ func selectBestDriver(

baseDrivers := driver.GetManager().Query(baseFilter)
logger.Debugw("before specific filter, we found the following drivers", "count", len(baseDrivers))
for _, d := range baseDrivers {
logger.Debugw(d.Info().Label, "priority", float32(d.Info().Priority), "type", d.Info().DeviceType)
for i, d := range baseDrivers {
Copy link
Member Author

Choose a reason for hiding this comment

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

more info for base drivers (pre-filter)

logger.Debugw("found no drivers matching filter")
} else {
logger.Debugw("found drivers matching specific filter", "count", len(driverProperties))
return nil, prop.Media{}, errors.New("found no queryable drivers matching filter")
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure why we don't return immediately before. It makes the error less clear.

@@ -203,14 +216,14 @@ func queryDriverProperties(
if isAvailable {
err := d.Open()
if err != nil {
logger.Debugw("error opening driver for querying", "error", err)
logger.Infow("error trying to open driver for querying", "error", err)
Copy link
Member Author

@hexbabe hexbabe Feb 14, 2025

Choose a reason for hiding this comment

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

these should be info logs since they include valuable information such as IO errors when accessing the driver for query

@hexbabe hexbabe requested a review from randhid February 14, 2025 17:34
@hexbabe hexbabe merged commit 3a553c2 into viamrobotics:main Feb 14, 2025
16 checks passed
@hexbabe hexbabe deleted the RSDK-5526 branch February 14, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants