3 Commits
v3 ... v4

Author SHA1 Message Date
Arti Zirk
647a90c0f2 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
2023-08-11 22:09:22 +03:00
Arti Zirk
92469f11b2 Do not error on git describe if tags are missing
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-11 14:35:57 +03:00
a75aeeb8f9 Add Drone config
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-11 14:28:42 +03:00
3 changed files with 5 additions and 3 deletions

2
.drone.yml Normal file
View File

@@ -0,0 +1,2 @@
kind: template
load: docker-multiarch.yaml

View File

@@ -2,7 +2,7 @@
all: build all: build
GOBUILDLDFLAGS="-X main.Version=`git describe --dirty`" GOBUILDLDFLAGS="-X main.Version=`git describe --always --dirty`"
#GOBUILDLDFLAGS="-X main.Version=`git describe --dirty` -linkmode 'external' -extldflags '-static'" #GOBUILDLDFLAGS="-X main.Version=`git describe --dirty` -linkmode 'external' -extldflags '-static'"
build: build:

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)
} }