Skip to content

Commit

Permalink
rpicamera: support two CSI cameras at once (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Mar 15, 2023
1 parent 33b72c5 commit 09a61f4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/conf/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,10 @@ func (pconf *PathConf) checkAndFillMissing(conf *Conf, name string) error {
}

for otherName, otherPath := range conf.Paths {
if otherPath != pconf && otherPath != nil && otherPath.Source == "rpiCamera" {
return fmt.Errorf("'rpiCamera' is used as source in two paths ('%s' and '%s')", name, otherName)
if otherPath != pconf && otherPath != nil &&
otherPath.Source == "rpiCamera" && otherPath.RPICameraCamID == pconf.RPICameraCamID {
return fmt.Errorf("'rpiCamera' with camera ID %d is used as source in two paths ('%s' and '%s')",
pconf.RPICameraCamID, name, otherName)
}
}

Expand Down

0 comments on commit 09a61f4

Please sign in to comment.