feat: v1.0 — Config UI app, live tuning, throttle/brake curves, haptics, CI#1
Conversation
…ng, diagnostics - MyGamepadFX/config.lua: 9 new parameters (GAS_*, BRAKE_*, HAPTICS_*, DEBUG_MODE) - MyGamepadFX/lib.lua: add logOnce helper - MyGamepadFX/debug.lua: add carSteer and dt_ms overlay fields - MyGamepadFX/assist.lua: full pipeline rewrite — diagnostics, error guards, throttle/brake curves, haptic trigger rumble, frame-drop warning, live_cfg.ini polling (0.5s) for Config UI app - MyGamepadFX_Config/: new CSP Lua app — 20-parameter slider UI, writes live_cfg.ini to script folder, changes apply within 0.5s - .luacheckrc: luacheck config for CSP LuaJIT environment
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 58 minutes and 1 second. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughAdds a live config tuning system: a new ChangesLive Config Tuning & Config UI
Sequence Diagram(s)sequenceDiagram
participant User
participant windowMain
participant saveLiveCfg
participant live_cfg.ini
participant applyLiveCfg
participant CFG
User->>windowMain: adjusts slider/checkbox
windowMain->>windowMain: sets dirty=true, updates cfg[key]
Note over windowMain: throttled: saveTimer <= 0
windowMain->>saveLiveCfg: write on timer
saveLiveCfg->>live_cfg.ini: INIConfig.set(PARAMS, ...).save()
Note over applyLiveCfg: assist.lua polls every 0.5s
applyLiveCfg->>live_cfg.ini: INIConfig.load(LIVE_CFG_PATH)
live_cfg.ini-->>applyLiveCfg: all PARAMS values
applyLiveCfg->>CFG: overwrites GAS_*, BRAKE_*, HAPTICS_*, STEER_* etc.
CFG-->>applyLiveCfg: updated live in-session
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.luacheckrc:
- Around line 11-14: The global ignore configuration for warning code 143
(undefined-field) is too broad and will allow typos on CSP globals to slip past
CI. Instead of ignoring this warning project-wide, remove "143" from the ignore
table and use a narrower scoping mechanism such as an inline comment or per-file
configuration to suppress the warning only where math.clamp is accessed,
ensuring that undefined-field checks remain active elsewhere in the codebase.
In `@MyGamepadFX_Config/app.lua`:
- Around line 157-159: Add validation logic in the configuration save/apply
handler to enforce that HAPTICS_SLIP_MAX must be greater than
HAPTICS_SLIP_START. When the user attempts to save the configuration with these
sliders (the 'Slip start' and 'Slip max' sliderRow elements bound to
HAPTICS_SLIP_START and HAPTICS_SLIP_MAX), check that HAPTICS_SLIP_MAX is
strictly greater than HAPTICS_SLIP_START. If the condition is violated, either
prevent the save operation, show an error message to the user, or automatically
correct the invalid value to maintain a valid range for the haptics intensity
calculations downstream in assist.lua.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: c5d31726-af93-48f7-9924-7ec4cd4172c2
📒 Files selected for processing (7)
.luacheckrcMyGamepadFX/assist.luaMyGamepadFX/config.luaMyGamepadFX/debug.luaMyGamepadFX/lib.luaMyGamepadFX_Config/app.luaMyGamepadFX_Config/manifest.ini
📜 Review details
🧰 Additional context used
🪛 Luacheck (1.2.0)
MyGamepadFX_Config/app.lua
[warning] 106-106: setting non-standard global variable 'windowMain'
(W111)
🔇 Additional comments (5)
MyGamepadFX/debug.lua (1)
8-23: LGTM!MyGamepadFX/config.lua (1)
24-37: LGTM!MyGamepadFX/lib.lua (1)
5-13: LGTM!MyGamepadFX/assist.lua (1)
9-141: LGTM!MyGamepadFX_Config/manifest.ini (1)
1-12: LGTM!
| ignore = { | ||
| "212", -- unused argument: dt is required by CSP entry point signatures | ||
| "143", -- accessing undefined field: math.clamp is a CSP extension to math | ||
| } |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial | ⚡ Quick win
Narrow the undefined-field suppression.
Ignoring luacheck warning 143 project-wide disables undefined-field checks everywhere, so typos on CSP globals will now slip past CI. If only math.clamp needs an exception, scope it more narrowly instead of silencing the warning globally.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.luacheckrc around lines 11 - 14, The global ignore configuration for
warning code 143 (undefined-field) is too broad and will allow typos on CSP
globals to slip past CI. Instead of ignoring this warning project-wide, remove
"143" from the ignore table and use a narrower scoping mechanism such as an
inline comment or per-file configuration to suppress the warning only where
math.clamp is accessed, ensuring that undefined-field checks remain active
elsewhere in the codebase.
| sliderRow('Slip start', 'HAPTICS_SLIP_START', 0.0, 1.0, '%.2f') | ||
| sliderRow('Slip max', 'HAPTICS_SLIP_MAX', 0.0, 2.0, '%.2f') | ||
| sliderRow('Strength', 'HAPTICS_STRENGTH', 0.0, 1.0, '%.2f') |
There was a problem hiding this comment.
Enforce HAPTICS_SLIP_MAX > HAPTICS_SLIP_START before saving.
These sliders currently allow invalid ordering, which can propagate to assist.lua and break haptics intensity math (zero/negative range divisor).
Suggested fix
if cfg.HAPTICS_ENABLED then
sliderRow('Slip start', 'HAPTICS_SLIP_START', 0.0, 1.0, '%.2f')
sliderRow('Slip max', 'HAPTICS_SLIP_MAX', 0.0, 2.0, '%.2f')
+ if cfg.HAPTICS_SLIP_MAX <= cfg.HAPTICS_SLIP_START then
+ cfg.HAPTICS_SLIP_MAX = cfg.HAPTICS_SLIP_START + 0.01
+ dirty = true
+ end
sliderRow('Strength', 'HAPTICS_STRENGTH', 0.0, 1.0, '%.2f')
end📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| sliderRow('Slip start', 'HAPTICS_SLIP_START', 0.0, 1.0, '%.2f') | |
| sliderRow('Slip max', 'HAPTICS_SLIP_MAX', 0.0, 2.0, '%.2f') | |
| sliderRow('Strength', 'HAPTICS_STRENGTH', 0.0, 1.0, '%.2f') | |
| sliderRow('Slip start', 'HAPTICS_SLIP_START', 0.0, 1.0, '%.2f') | |
| sliderRow('Slip max', 'HAPTICS_SLIP_MAX', 0.0, 2.0, '%.2f') | |
| if cfg.HAPTICS_SLIP_MAX <= cfg.HAPTICS_SLIP_START then | |
| cfg.HAPTICS_SLIP_MAX = cfg.HAPTICS_SLIP_START + 0.01 | |
| dirty = true | |
| end | |
| sliderRow('Strength', 'HAPTICS_STRENGTH', 0.0, 1.0, '%.2f') |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@MyGamepadFX_Config/app.lua` around lines 157 - 159, Add validation logic in
the configuration save/apply handler to enforce that HAPTICS_SLIP_MAX must be
greater than HAPTICS_SLIP_START. When the user attempts to save the
configuration with these sliders (the 'Slip start' and 'Slip max' sliderRow
elements bound to HAPTICS_SLIP_START and HAPTICS_SLIP_MAX), check that
HAPTICS_SLIP_MAX is strictly greater than HAPTICS_SLIP_START. If the condition
is violated, either prevent the save operation, show an error message to the
user, or automatically correct the invalid value to maintain a valid range for
the haptics intensity calculations downstream in assist.lua.
Quality Check ✅ Passed
|
Summary
MyGamepadFX_Config/) — new CSP Lua in-game overlay with 20 live parameter sliders (steering, speed scaling, self-steer, slip limit, throttle/brake curves, haptics, debug mode). Writeslive_cfg.iniinto the script folder;assist.luapolls and applies it within 0.5 seconds while driving, no restart required.config.luakeys:GAS_DEADZONE,GAS_GAMMA,BRAKE_DEADZONE,BRAKE_GAMMA.ac.setTriggerRumble. Disabled by default (HAPTICS_ENABLED = false); requires CSP v0.2.0+ and a controller with trigger motors.logOnce(no per-frame log spam).quality.ymlworkflow: Lua syntax check (luac5.2 -p), luacheck lint, structure/manifest/config-key validation, automatic PR comment with per-check results table.Breaking changes
config.luahas 9 new required keys (GAS_*,BRAKE_*,HAPTICS_*,DEBUG_MODE). Users with customized configs must copy their values into the new template — the old file will cause a Lua error on load.Test plan
MyGamepadFX/to AC; verify startup diagnostic fires ([MyGamepadFX] === Startup Diagnostic ===) in CM logMyGamepadFX Configapp in-game; move a slider; confirm change applies within ~0.5s while drivingconfig.luaupgrade path: missing keys produce a clear Lua error, not silent wrong behavior