mirror of https://bitbucket.org/ausocean/av.git
reduce max frames
This commit is contained in:
parent
014230a274
commit
6505223782
|
@ -107,7 +107,7 @@ const (
|
|||
profilePath = "rv.prof"
|
||||
pkg = "rv: "
|
||||
runPreDelay = 20 * time.Second
|
||||
maxImages = 10 // Max number of images read when evaluating turbidity.
|
||||
maxImages = 1 // Max number of images read when evaluating turbidity.
|
||||
)
|
||||
|
||||
// Software define pin values.
|
||||
|
@ -189,12 +189,14 @@ func (tp *turbidityProbe) Write(p []byte) (int, error) {
|
|||
imgs = append(imgs, img.Clone())
|
||||
}
|
||||
if len(imgs) <= 0 {
|
||||
tp.log.Log(logger.Info, "no frames found")
|
||||
tp.log.Log(logger.Warning, "no frames found", "error", err.Error())
|
||||
return len(p), nil
|
||||
}
|
||||
tp.log.Log(logger.Debug, "found frames", "frames", len(imgs))
|
||||
|
||||
// Process video data to get saturation and contrast scores.
|
||||
res, err := tp.ts.Evaluate(imgs)
|
||||
tp.log.Log(logger.Debug, "finished evaluation")
|
||||
if err != nil {
|
||||
tp.log.Error("evaluate failed", "error", err.Error())
|
||||
return len(p), err
|
||||
|
@ -240,7 +242,7 @@ func main() {
|
|||
rv *revid.Revid
|
||||
p *turbidityProbe
|
||||
)
|
||||
p, err := NewTurbidityProbe(*log, 60*time.Second)
|
||||
p, err := NewTurbidityProbe(*log, 120*time.Second)
|
||||
|
||||
log.Log(logger.Debug, "initialising netsender client")
|
||||
ns, err := netsender.New(log, nil, readPin(p, rv, log), nil, createVarMap())
|
||||
|
|
Loading…
Reference in New Issue