Skip to content

Commit

Permalink
Merge pull request #2 from ftl/1-add-several-pages
Browse files Browse the repository at this point in the history
1 add support for several pages
  • Loading branch information
ftl authored Dec 9, 2023
2 parents bf37754 + 3a928ab commit 4a82b24
Show file tree
Hide file tree
Showing 15 changed files with 976 additions and 277 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: Install Linux packages
run: sudo apt update && sudo apt install -y --no-install-recommends debhelper libhidapi-libusb0

- name: Set up Go 1.16
- name: Set up Go 1.21
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.21
id: go

- name: Check out code into the Go module directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Install Linux packages
run: sudo apt update && sudo apt install -y --no-install-recommends debhelper libhidapi-libusb0

- name: Set up Go 1.16
- name: Set up Go 1.21
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.21
id: go

- name: Check out code into the Go module directory
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ VERSION?=$(shell git describe --tags)
GITCOMMIT=$(shell git rev-parse --verify --short HEAD)
BUILDTIME=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")

all: test build
.PHONY: all
all: test build

hamdeck:
go build -v -o hamdeck -ldflags "-X github.com/ftl/hamdeck/cmd.version=$(VERSION) -X github.com/ftl/hamdeck/cmd.gitCommit=$(GITCOMMIT) -X github.com/ftl/hamdeck/cmd.buildTime=$(BUILDTIME)" .

build: hamdeck
.PHONY: build
build: hamdeck

.PHONY: test
test:
go test ./... -v
.PHONY: test

.PHONY: clean
clean:
-@rm ./hamdeck
.PHONY: clean

.PHONY: install
install: hamdeck
cp ./hamdeck /usr/bin/hamdeck
mkdir -p /usr/share/hamdeck
cp ./example_conf.json /usr/share/hamdeck/example_conf.json
cp ./.debpkg/lib/systemd/system/hamdeck.service /lib/systemd/system/hamdeck.service
cp ./.debpkg/lib/udev/rules.d/99-hamdeck.rules /lib/udev/rules.d/99-hamdeck.rules
.PHONY: install

.PHONY: uninstall
uninstall:
-rm /usr/bin/hamdeck
-rm /usr/share/hamdeck/example_conf.json
-rmdir /usr/share/hamdeck
-rm /lib/systemd/system/hamdeck.service
-rm /lib/udev/rules.d/99-hamdeck.rules
.PHONY: uninstall

hamdeck:
go build -v -o hamdeck -ldflags "-X github.com/ftl/hamdeck/cmd.version=$(VERSION) -X github.com/ftl/hamdeck/cmd.gitCommit=$(GITCOMMIT) -X github.com/ftl/hamdeck/cmd.buildTime=$(BUILDTIME)" .
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func run(cmd *cobra.Command, args []string) {
device.SetBrightness(rootFlags.brightness)

deck := hamdeck.New(device)
deck.RegisterFactory(hamdeck.NewButtonFactory(deck))
deck.RegisterFactory(pulse.NewButtonFactory())
if rootFlags.hamlibAddress != "" {
deck.RegisterFactory(hamlib.NewButtonFactory(rootFlags.hamlibAddress))
Expand Down
Loading

0 comments on commit 4a82b24

Please sign in to comment.