From bb6641d1aac248c70ec921e5c4b4b1c9eb31c234 Mon Sep 17 00:00:00 2001 From: Luca Berneking Date: Tue, 23 Jan 2024 15:15:38 +0100 Subject: [PATCH] Fix config symlink error #1 fixes #1 --- Makefile | 2 +- pkg/setup/usb.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ed4fee9..2fcfd85 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ daemon: build upload cleanup-remote daemon-remote .PHONY: build build: - go build -ldflags "-X 'github.com/lucaber/deckjoy/pkg/config.Version=0.0.1'" -o deckjoy main.go + go build -ldflags "-X 'github.com/lucaber/deckjoy/pkg/config.Version=0.0.2'" -o deckjoy main.go .PHONY: zip zip: build diff --git a/pkg/setup/usb.go b/pkg/setup/usb.go index 1e71940..c34face 100644 --- a/pkg/setup/usb.go +++ b/pkg/setup/usb.go @@ -135,6 +135,9 @@ func (d *Deck) SetupHidDevice(name string, reportDesc []byte, userPermissions bo return "", err } + // disable first, before adding new function to the config + _ = d.gadget.Disable() + err = d.conf.AddFunction(hid.FunctionGeneric) if err != nil { return "", err