av/cmd/rv/probe_circleci.go

56 lines
1.5 KiB
Go
Raw Normal View History

//go:build nocv
// +build nocv
/*
DESCRIPTION
Replaces turbidity probe implementation that uses the gocv package.
When Circle-CI builds revid this is needed because Circle-CI does not
have a copy of Open CV installed.
AUTHORS
Russell Stanley <russell@ausocean.org>
LICENSE
Copyright (C) 2021-2022 the Australian Ocean Lab (AusOcean)
It is free software: you can redistribute it and/or modify them
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
It is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
in gpl.txt. If not, see http://www.gnu.org/licenses.
*/
package main
import (
"time"
"bitbucket.org/ausocean/utils/logger"
)
2022-02-08 03:50:20 +03:00
type turbidityProbe struct {
sharpness, contrast float64
}
2022-02-09 04:36:28 +03:00
// NewTurbidityProbe returns an empty turbidity probe for CircleCI testing only.
func NewTurbidityProbe(log logger.Logger, delay time.Duration) (*turbidityProbe, error) {
tp := new(turbidityProbe)
return tp, nil
}
2022-02-08 03:50:20 +03:00
// Write performs no operation for CircleCI testing only.
func (tp *turbidityProbe) Write(p []byte) (int, error) {
2022-02-09 04:36:28 +03:00
return 0, nil
}
func (tp *turbidityProbe) Close() error {
return nil
}