diff --git a/cmd/treatment/circleci.go b/cmd/treatment/circleci.go index a3e7c1e9..83fe00c2 100644 --- a/cmd/treatment/circleci.go +++ b/cmd/treatment/circleci.go @@ -1,4 +1,4 @@ -// +build circleci +// +build !pi3 /* DESCRIPTION diff --git a/cmd/treatment/main.go b/cmd/treatment/main.go index 472ec806..dc7fde99 100644 --- a/cmd/treatment/main.go +++ b/cmd/treatment/main.go @@ -69,9 +69,7 @@ const ( const ( netSendRetryTime = 5 * time.Second defaultSleepTime = 60 // Seconds - profilePath = "rv.prof" pkg = "rv: " - runPreDelay = 20 * time.Second ) // Treatment modes. @@ -92,7 +90,6 @@ func main() { // Set up the player command with audio file path. filePtr := flag.String("path", "", "Path to sound file we wish to play.") flag.Parse() - cmd := exec.Command(audioCmd, *filePtr) // Create lumberjack logger to handle logging to file. fileLog := &lumberjack.Logger{ @@ -109,6 +106,11 @@ func main() { // lumberjack and netloggers. log := logger.New(logVerbosity, io.MultiWriter(fileLog, netLog), logSuppress) + if *filePtr == "" { + log.Log(logger.Fatal, "no file path provided, check usage") + } + cmd := exec.Command(audioCmd, *filePtr) + // The netsender client will handle communication with netreceiver and GPIO stuff. log.Log(logger.Debug, "initialising netsender client") ns, err := netsender.New(log, gpio.InitPin, gpio.ReadPin, gpio.WritePin, varMap) diff --git a/cmd/treatment/pi3.go b/cmd/treatment/pi3.go index f93e6c39..fefd475f 100644 --- a/cmd/treatment/pi3.go +++ b/cmd/treatment/pi3.go @@ -1,4 +1,4 @@ -// +build !circleci +// +build pi3 /* DESCRIPTION