Simon Gardling 876864c854 forza-trigger: actively release trigger and clear lightbar on idle
Two issues in the deployed daemon:

  1. After FH5 exits, the lightbar stayed lit. reset_triggers() touched
     only triggers; pydualsense's BG sendReport thread kept re-publishing
     whatever TouchpadColor we last set, so the controller stayed in the
     last race color forever.

  2. R2 had residual tension in FH5's main menu and on the desktop after
     a race. Pre-race / idle states were emitting RacingDSX's NormalTrigger
     (mode byte 0x00), which per Sony's docs (Nielk1 Rev6) only clears
     state without retracting the trigger motor; mode 0x05 (canonical Off
     / Reset) actively returns the trigger to neutral. RacingDSX-on-Windows
     gets away with 0x00 because something else (Steam Input or the OS)
     reliably resets the motor on focus loss; on Linux nothing does.

Fixes:
  - Drop _apply_normal/DS_MODE_NORMAL. Use _apply_off (mode 0x05) for every
    'release the trigger' intent: pre-race per-frame, idle timeout, mid-race
    zero-strength fallback, shutdown.
  - Add reset_lightbar() that writes RGB(0,0,0).
  - Track have_telemetry and fire the idle-timeout branch whenever
    telemetry has been silent for IDLE_TIMEOUT_S, regardless of in_race.
    Reset both triggers and lightbar in that branch.

Documented as divergence #4 in the module docstring.
2026-05-03 00:35:49 -04:00
2026-05-03 00:35:49 -04:00
2026-04-23 01:17:10 -04:00
2026-05-03 00:35:49 -04:00
2026-05-03 00:35:49 -04:00
2026-05-03 00:35:48 -04:00
2026-04-22 07:28:56 -04:00
2026-05-03 00:35:48 -04:00
2026-04-30 02:15:24 -04:00
2026-04-25 22:24:36 -04:00
2026-04-23 20:23:37 -04:00

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.png to upscale it bilinearly
Description
Unified NixOS flake for mreow, yarn, muffin
Readme 4.8 MiB
Languages
Nix 80%
Python 15.7%
Emacs Lisp 2.4%
Shell 1.9%