Allow configuring more options via ENV

This commit is contained in:
Arti Zirk
2023-08-06 16:48:17 +03:00
parent a9e008b7f2
commit a6b928dc0e
2 changed files with 50 additions and 18 deletions

View File

@@ -103,6 +103,7 @@ func (w *WiegandHW) wiegandBEvent(evt gpiod.LineEvent) {
func WiegandSetup(a int, b int, bitTimeout time.Duration, solenoid int) *WiegandHW {
log.Printf("Wiegand GPIO-s: A:%d B:%d Solenoid:%d", a, b, solenoid)
var wiegand WiegandHW
wiegand.bitTimeout = bitTimeout