Skip to content

Commit

Permalink
Clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hexbabe committed Nov 13, 2024
1 parent 9ee736d commit 5cfecf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/camera/videosource/webcam.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func init() {
}

// getProperties is a helper func for webcam discovery that returns the Media properties of a specific driver.
// It is NOT serving the camera Properties proto API.
// It is NOT related to the GetProperties camera proto API.
func getProperties(d driver.Driver) (_ []prop.Media, err error) {
// Need to open driver to get properties
if d.Status() == driver.StateClosed {
Expand Down Expand Up @@ -162,7 +162,7 @@ func (c WebcamConfig) Validate(path string) ([]string, error) {
return []string{}, nil
}

// needsDriverReinit is a helper to check for config diffs and returns true if the driver needs to be reinitialized.
// needsDriverReinit is a helper to check for config diffs and returns true iff the driver needs to be reinitialized.
func (c WebcamConfig) needsDriverReinit(other WebcamConfig) bool {
return !(c.Format == other.Format &&
c.Path == other.Path &&
Expand Down Expand Up @@ -310,7 +310,7 @@ func findAndMakeVideoSource(
return source, path, nil
}

// webcam is a video driver camera wrapper that ensures its underlying camera stays connected.
// webcam is a video driver wrapper camera that ensures its underlying source stays connected.
type webcam struct {
resource.Named
mu sync.RWMutex
Expand Down

0 comments on commit 5cfecf5

Please sign in to comment.