av/cmd/rv/probe_circleci.go

54 lines
1.5 KiB
Go
Raw Permalink Normal View History

//go:build !withcv
// +build !withcv
/*
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/logging"
)
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 logging.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.
2022-04-29 07:23:52 +03:00
func (tp *turbidityProbe) Write(p []byte) (int, error) { return 0, nil }
2022-04-29 07:23:52 +03:00
func (tp *turbidityProbe) Update(mat []float64) error { return nil }
2022-04-12 07:21:17 +03:00
2022-04-29 07:23:52 +03:00
func (tp *turbidityProbe) Close() error { return nil }