11d283585ca30e9fe9366a070ba92610e9e1ae95
Live diagnostic on yarn revealed the daemon was receiving 324-byte FH5 packets correctly (5.7MB on the systemd socket; strace showed steady recvfrom + write to /dev/hidraw7) but writing trigger mode 0x05 (no-resistance) on nearly every tick. Cause: `accel` and `brake` are 0 most of the time during normal play (off-throttle on straight sections, off-brake when not braking). Both handlers had: if accel/255 <= THROTTLE_INPUT_THRESHOLD: effect.off(); return if brake/255 <= BRAKE_INPUT_THRESHOLD: effect.off(); return Every off-pedal packet set the trigger to OFF. Brief pedal-on moments set vibration. The result: rapidly oscillating off↔vibration state, imperceptible at 60 Hz packet rate. These early-returns were holdovers from the previous Race-Element 1:1 port (variant A), which IS designed to be silent unless slipping. Variant D's whole point is "always feels something" — Cosmii has no pedal-off gate, and its baseline branch produces feedback even at brake=0/accel=0 with strength clamped to MIN. Fix: remove both early-returns. Foot-off-pedal flows through the baseline branch and produces feedback(strength=MIN_*_RESISTANCE). The user feels light constant resistance instead of silence. Trigger only returns to physical-rest when out-of-race (run-loop's reset_triggers). Also drop the now-dead BRAKE_INPUT_THRESHOLD / THROTTLE_INPUT_THRESHOLD constants. Two tests renamed and updated to assert MIN-strength baseline feedback instead of effect.off() on zero pedal. 54/54 tests pass. Build clean.
My NixOS configs ✨
Hosts
- mreow: My personal Framework 13 laptop
- yarn: Machine I usually just play games on. Boots into SteamOS-like interface.
- muffin: Homeserver, runs various services.
Desktop/Laptop
What do I use?
Browser: Firefox 🦊 (actually Zen Browser :p)
Text Editor: Doom Emacs
Terminal: ghostty
Shell: fish with the pure prompt
WM: niri
Background
- Got my background from here and used the command
magick input.png -filter Point -resize 2880x1920! output.pngto upscale it bilinearly
Description
Languages
Nix
77.5%
Python
17.2%
Shell
3.5%
Emacs Lisp
1.8%