Skip to content

Feature/RGB shiftlights & dynamic rev limiter#87

Open
TiansuoLi wants to merge 4 commits into
HamzaYslmn:mainfrom
TiansuoLi:feature/dynamic-redline-rgb-shiftlights
Open

Feature/RGB shiftlights & dynamic rev limiter#87
TiansuoLi wants to merge 4 commits into
HamzaYslmn:mainfrom
TiansuoLi:feature/dynamic-redline-rgb-shiftlights

Conversation

@TiansuoLi

Copy link
Copy Markdown

PR Description

Hi there! 👋

This PR introduces two new features aimed at enhancing the adaptive feedback experience:

✨ Dynamic Redline Detection

  • Problem: The original rev limiter feedback relies on a fixed rpm / max_rpm ratio. Since redline RPM values vary widely across vehicles, this often leads to inaccurate trigger points and requires manual per-car tuning.
  • Solution: The system now initializes using linear interpolation based on max_rpm, then reads real-time telemetry data (throttle position and RPM changes) to dynamically calculate the precise redline zone. A vehicle ID check is used to detect car swaps and automatically recalibrate.
6eec923a264701ff07bfde4835e463a

🌈 RGB Shift Lights

  • Feature: Displays real-time RGB color indicators via the controller's touchpad/light bar, simulating a racing-style shift light based on the current RPM relative to the detected redline.
  • Color Logic: Green (low RPM) → Yellow (mid RPM) → Red (near redline) → Flashing (rev limiter engaged).
  • Compatibility: Tested with DualSense and DualSenseEdge . Supports both native HID and DSX output modes. (Player LED control is limited in DSX mode, so lighting effects may differ slightly.)
e23985b9a8c10137a0c4f82cbab7fa0

⚙️ GUI Integration

  • All new options are fully configurable via the Settings page in the GUI. TUI support was not updated in this PR — only the GUI received new settings for these features.

A quick note: I'm not a professional developer, and I used AI assistance to help write parts of the code. As a result, some implementation details may differ slightly from the latest codebase conventions. I've done my best to keep things clean and functional, but I truly appreciate any feedback or suggestions for improvement!

Thanks for reviewing — hope you find these additions useful! 🙌

@TiansuoLi TiansuoLi force-pushed the feature/dynamic-redline-rgb-shiftlights branch from 412ade3 to 7e628ee Compare July 12, 2026 21:55
@HamzaYslmn

Copy link
Copy Markdown
Owner

Hi

Max RPM does not represent the redline.
Some vehicles hit the redline at 90%, while most electric vehicles reach it at 99%.

Max RPM only indicates the vehicle’s maximum RPM value.

I was also considering adding the RGB Shift Lights feature. Glad you added it; I’ll take a look when I have some free time.

Thanks for PR

@TiansuoLi

TiansuoLi commented Jul 12, 2026

Copy link
Copy Markdown
Author

Hi

Max RPM does not represent the redline. Some vehicles hit the redline at 90%, while most electric vehicles reach it at 99%.

Max RPM only indicates the vehicle’s maximum RPM value.

I was also considering adding the RGB Shift Lights feature. Glad you added it; I’ll take a look when I have some free time.

Thanks for PR

Hi,

Thanks for the reply! I'm aware of the distinction between max RPM and the actual redline. In the current implementation, I temporarily overwrite the max RPM value with the detected redline RPM purely to simplify the downstream trigger and LED calculations — this makes it much easier to pinpoint the exact shift point.

That said, you're absolutely right that there's no specific optimization for EVs yet. Single- or two-speed EVs could indeed cause persistent vibration at high speeds under this logic. Really appreciate the heads-up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants