Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a0be388
docs: built-in humanization design + threat model + integration findings
ramseymcgrath Jun 2, 2026
d7ed918
docs: resolve humanization decisions — consolidate to one module, def…
ramseymcgrath Jun 2, 2026
8a74060
docs: built-in humanization implementation plan
ramseymcgrath Jun 2, 2026
a568d52
test: host harness + humanize.c filter API skeleton
ramseymcgrath Jun 2, 2026
bc8864b
feat: humanization filter core (conserving 1st-order drain + noise + …
ramseymcgrath Jun 2, 2026
6773cbd
refactor: humanize.c clarity (explicit residual capture, named timing…
ramseymcgrath Jun 2, 2026
b02f10a
feat: route all injection through the humanization filter (single point)
ramseymcgrath Jun 2, 2026
c36bd77
refactor: kmbox injection routing — tab indent + symmetric applied-de…
ramseymcgrath Jun 2, 2026
38213cf
feat: drive PIT jitter + injection from humanization filter; gate fil…
ramseymcgrath Jun 2, 2026
e9b3142
refactor: drop unused timing skip param; rename stale smooth comments
ramseymcgrath Jun 2, 2026
668e3d6
feat: km.human(level) control (Ferrum + Hurra 0x1A), default-on prese…
ramseymcgrath Jun 2, 2026
04752df
refactor: l_human len guard matches sibling listeners
ramseymcgrath Jun 2, 2026
8a9a468
refactor: retire smooth.c trajectory generator; humanize.c is the sin…
ramseymcgrath Jun 2, 2026
2ba667f
refactor: drop dead use_smooth parameter threaded through injection path
ramseymcgrath Jun 2, 2026
9a77b49
test: Tier-1 humanization statistical analyzer
ramseymcgrath Jun 2, 2026
920173e
Merge: built-in always-on humanization filter (retire smooth.c genera…
ramseymcgrath Jun 2, 2026
eeec3a9
fix: humanization injection — in-frame delivery, single-report emissi…
ramseymcgrath Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Bare-metal USB proxy firmware for NXP i.MX RT1062. Man-in-the-middle USB HID dev
- `src/hurra.c` / `src/hurra.h` — Hurra binary protocol parser (TinyFrame), default
- `src/proto.h` — compile-time protocol selector (`proto_*` -> Hurra or Ferrum)
- `src/ferrum.c` / `src/ferrum.h` — Ferrum ASCII parser (opt-in via `PROTOCOL=ferrum`)
- `src/smooth.c` — Smooth motion queue, bezier, humanization, sub-pixel accumulation
- `src/humanize.c` — Always-on humanization filter applied to every injected delta (jitter, micro-correction, sub-pixel carry); the standalone smooth/easing trajectory generator (smooth.c) was retired — humanize.c is now the single humanization path
- `src/usb_host.c` / `src/usb_device.c` — EHCI host + device controllers
- `src/main.c` — Main loop: poll → merge → send

Expand All @@ -36,4 +36,4 @@ Bare-metal USB proxy firmware for NXP i.MX RT1062. Man-in-the-middle USB HID dev
- `make flash` — flashes via teensy_loader_cli
- `make clean` — removes objects + artifacts
- ARM GCC via PlatformIO toolchain
- Hot-path files (-O2 + -ffast-math): kmbox, hurra (or ferrum), actions, smooth, usb_host, usb_device, humanize
- Hot-path files (-O2 + -ffast-math): kmbox, hurra (or ferrum), actions, usb_host, usb_device, humanize
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ LDFLAGS = $(MCU_FLAGS) \

CORE_SRC = core/startup.c core/bootdata.c
SRC = src/main.c src/usb_host.c src/usb_device.c src/desc_capture.c \
src/kmbox.c src/humanize.c src/smooth.c src/actions.c src/led.c \
src/kmbox.c src/humanize.c src/actions.c src/led.c \
$(PROTO_SRC)

OBJ = $(CORE_SRC:.c=.o) $(SRC:.c=.o)
Expand All @@ -58,7 +58,7 @@ $(TARGET).hex: $(TARGET).elf
$(OBJCOPY) -O ihex -R .eeprom $< $@

# Hot-path sources get -O2 instead of -Os
HOT_SRC = src/usb_host.o src/usb_device.o src/kmbox.o src/smooth.o \
HOT_SRC = src/usb_host.o src/usb_device.o src/kmbox.o \
src/humanize.o src/actions.o
ifeq ($(PROTOCOL),hurra)
HOT_SRC += src/hurra.o src/third_party/TinyFrame/TinyFrame.o
Expand All @@ -77,3 +77,11 @@ clean:
rm -f $(OBJ) $(TARGET).elf $(TARGET).hex

.PHONY: all flash clean

# Host-native unit tests (no cross-compile). humanize.c must stay free of
# hardware headers behind HUMANIZE_HOSTTEST so it builds with system gcc.
.PHONY: test
test:
cc -std=c11 -O2 -DHUMANIZE_HOSTTEST -Isrc -o /tmp/humanize_test \
test/humanize_test.c src/humanize.c -lm
/tmp/humanize_test
Loading
Loading