Merged in t-debug (pull request #428)

treat: nil read pin and add debug logging

Approved-by: Saxon Milton
This commit is contained in:
Trek Hopton 2020-09-14 02:15:24 +00:00
commit e468f155d8
1 changed files with 4 additions and 1 deletions

View File

@ -113,7 +113,7 @@ 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())
}
@ -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)