mirror of https://bitbucket.org/ausocean/av.git
cmd/treatment: remove build tags for treatment
This was done because I don't know why this wouldn't build on circleci with the standard pi audio command in pi.go. cmd/treatment: merge pi.go into main.go There's no need for two files Approved-by: Alan Noble
This commit is contained in:
parent
2dd2c464c6
commit
9f56bee095
|
@ -1,34 +0,0 @@
|
||||||
// +build !pi3
|
|
||||||
|
|
||||||
/*
|
|
||||||
DESCRIPTION
|
|
||||||
circleci.go defines a dummy initialisation command for running on circleci.
|
|
||||||
|
|
||||||
AUTHORS
|
|
||||||
Ella Pietraroia <ella@ausocean.org>
|
|
||||||
Scott Barnard <scott@ausocean.org>
|
|
||||||
|
|
||||||
LICENSE
|
|
||||||
Copyright (C) 2020 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 "bitbucket.org/ausocean/utils/logging"
|
|
||||||
|
|
||||||
const audioCmd = ""
|
|
||||||
|
|
||||||
func initCommand(log logging.Logger) {}
|
|
|
@ -88,10 +88,14 @@ const (
|
||||||
|
|
||||||
// Variable map to send to netreceiver/vidgrind.
|
// Variable map to send to netreceiver/vidgrind.
|
||||||
var varMap = map[string]string{
|
var varMap = map[string]string{
|
||||||
"SpeakerMode": "enum:"+strings.Join([]string{modeStereo, modeLeft, modeRight, modeMute}, ","),
|
"SpeakerMode": "enum:" + strings.Join([]string{modeStereo, modeLeft, modeRight, modeMute}, ","),
|
||||||
"AudioFilePath": "string",
|
"AudioFilePath": "string",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const audioCmd = "aplay"
|
||||||
|
|
||||||
|
func initCommand(l logging.Logger) { checkPath(audioCmd, l) }
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
mts.Meta = meta.NewWith([][2]string{{metaPreambleKey, metaPreambleData}})
|
mts.Meta = meta.NewWith([][2]string{{metaPreambleKey, metaPreambleData}})
|
||||||
|
|
||||||
|
@ -274,7 +278,6 @@ func setChannels(mode string, l logging.Logger) error {
|
||||||
return fmt.Errorf("channel set command failed: %s", &errBuff)
|
return fmt.Errorf("channel set command failed: %s", &errBuff)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
l.Info("mode set to", "mode", mode)
|
l.Info("mode set to", "mode", mode)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
// +build pi3
|
|
||||||
|
|
||||||
/*
|
|
||||||
DESCRIPTION
|
|
||||||
pi3.go defines an initialisation function for use when running on the
|
|
||||||
Raspberry Pi 3.
|
|
||||||
|
|
||||||
AUTHORS
|
|
||||||
Ella Pietraroia <ella@ausocean.org>
|
|
||||||
Scott Barnard <scott@ausocean.org>
|
|
||||||
Saxon Nelson-Milton <saxon@ausocean.org>
|
|
||||||
|
|
||||||
LICENSE
|
|
||||||
Copyright (C) 2020 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 (
|
|
||||||
"bitbucket.org/ausocean/utils/logging"
|
|
||||||
)
|
|
||||||
|
|
||||||
const audioCmd = "aplay"
|
|
||||||
|
|
||||||
func initCommand(l logging.Logger) { checkPath(audioCmd, l) }
|
|
Loading…
Reference in New Issue