diff --git a/cmd/treatment/main.go b/cmd/treatment/main.go index 6d9fbb48..c7cea7d7 100644 --- a/cmd/treatment/main.go +++ b/cmd/treatment/main.go @@ -62,7 +62,7 @@ const ( logMaxSize = 500 // MB logMaxBackup = 10 logMaxAge = 28 // days - logVerbosity = logger.Info + logVerbosity = logger.Debug logSuppress = true ) @@ -113,14 +113,14 @@ func main() { // 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) + ns, err := netsender.New(log, gpio.InitPin, nil, gpio.WritePin, varMap) if err != nil { log.Log(logger.Fatal, "could not initialise netsender client", "error", err.Error()) } // Revid will handle the recording and sending of audio for sound checking. log.Log(logger.Debug, "initialising revid") - rv, err := revid.New(config.Config{Logger: log}, ns) + rv, err := revid.New(config.Config{Logger: log, LogLevel: logger.Debug}, ns) if err != nil { log.Log(logger.Fatal, "could not initialise revid", "error", err.Error()) } @@ -208,6 +208,9 @@ func run(rv *revid.Revid, ns *netsender.Sender, file *string, l *logger.Logger, sleep(ns, l) continue } + default: + l.Log(logger.Warning, "mode is not valid", "mode", ns.Mode()) + } l.Log(logger.Info, "revid updated with new mode") sleep(ns, l)