Enable Wiegand data internal pull-ups
Some checks reported errors
continuous-integration/drone/push Build is failing
continuous-integration/drone Build was killed

Back Door shield needs it as it does not have external pull-ups
This commit is contained in:
Arti Zirk 2023-08-11 22:09:22 +03:00
parent 92469f11b2
commit 647a90c0f2

View File

@ -113,14 +113,14 @@ func WiegandSetup(a int, b int, bitTimeout time.Duration, solenoid int) *Wiegand
} }
wa, err := gpiod.RequestLine("gpiochip0", a, gpiod.AsInput, wa, err := gpiod.RequestLine("gpiochip0", a, gpiod.AsInput,
gpiod.WithFallingEdge, gpiod.WithEventHandler(wiegand.wiegandAEvent)) gpiod.WithFallingEdge, gpiod.LineBiasPullUp, gpiod.WithEventHandler(wiegand.wiegandAEvent))
if err != nil { if err != nil {
panic(err) panic(err)
} }
wiegand.aLine = wa wiegand.aLine = wa
wb, err := gpiod.RequestLine("gpiochip0", b, gpiod.AsInput, wb, err := gpiod.RequestLine("gpiochip0", b, gpiod.AsInput,
gpiod.WithFallingEdge, gpiod.WithEventHandler(wiegand.wiegandBEvent)) gpiod.WithFallingEdge, gpiod.LineBiasPullUp, gpiod.WithEventHandler(wiegand.wiegandBEvent))
if err != nil { if err != nil {
panic(err) panic(err)
} }