Skip to content

Commit 768afca

Browse files
committed
Another pass after comments review
- Using effect + old to manage updates instead of custom implementation - Removed un-necessary functions - Documentation tidy-up - FFB_T500RS effects documentation rewritten, examples added - Init sequence simplified (on-par with windows captures). It was initially put in place and kept because it was "working" - Dropped the redundant second 0x02 and second 0x01 in constant upload path - Constant upload, play, and update paths now sends signed level and direction instead of scaling the raw level - changed T500RS_DBG to take the struct t500rs_device_entry * explicitly - Updated makefile to support build without being git repo (DKMS, tarball, release package)
1 parent 9c8c1f0 commit 768afca

File tree

4 files changed

+517
-295
lines changed

4 files changed

+517
-295
lines changed

Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@ KDIR ?= /lib/modules/$(shell uname -r)/build
22

33
# Auto-generated global build-time version for TMFF2
44
TMFF2_BASE_VERSION ?= 0.1
5-
GIT_HASH := $(shell git rev-parse --short=7 HEAD 2>/dev/null || echo "local")
5+
6+
# Allow packagers / CI to provide a fixed hash or full version:
7+
# make GIT_HASH=deadbee
8+
# make TMFF2_VERSION=0.1-1
9+
#
10+
# Only derive GIT_HASH from git if none was provided and this is a git checkout.
11+
ifeq ($(origin GIT_HASH), undefined)
12+
GIT_HASH := $(shell if command -v git >/dev/null 2>&1 && [ -d .git ]; then \
13+
git rev-parse --short=7 HEAD 2>/dev/null; \
14+
else \
15+
echo local; \
16+
fi)
17+
endif
18+
619
BUILD_HASH := $(shell date +%s | sha1sum | cut -c1-7)
720

821
TMFF2_VERSION ?= $(TMFF2_BASE_VERSION)-$(GIT_HASH)+b$(BUILD_HASH)

docs/FFBEFFECTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,4 +1025,4 @@ binary hex
10251025
ff00.0021 = 0
10261026
ff00.0021 = 0
10271027
ff00.0021 = 0
1028-
```
1028+
```

0 commit comments

Comments
 (0)