Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
d3657f2 to
1be6119
Compare
1be6119 to
2e0f4df
Compare
This commit introduces a new acceleration mode called 'No Acceleration'. This mode effectively disables any acceleration curve, resulting in a 1:1 sensitivity mapping. The changes include: - Adding `NoAccel` to the `AccelMode` enum. - Updating the `declare_params!` macro to support modes with no specific parameters, using a ZST for FFI safety. - Implementing `set_all_no_accel` in `ParamStore` and `SysFsStore` (as a no-op, since there are no parameters to set). - Extending the CLI to allow setting and getting parameters for the `NoAccel` mode. - Adding the `no_accel` mode to the kernel driver, including its sensitivity function which always returns `FIXEDPT_ONE`. - Adding a test case for the `no_accel` mode in the driver tests. - Integrating the `NoAccel` mode into the TUI, providing a basic sensitivity graph for it. This new mode provides a clear way to disable acceleration without needing to set other curve parameters to specific values that mimic no acceleration.
🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai>
98de140 to
eae9fdc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new "No Acceleration" (
NoAccel) mode to themaccelsystem. This mode provides a direct 1:1 mapping between input and output sensitivity, effectively disabling any acceleration curves.Key changes include:
Core Logic:
NoAccelas a newAccelModevariant.NoAccelCurveParamswhich is an empty struct, signifying no specific parameters for this mode. A_ffi_guardfield is included for FFI safety.__no_accel_sens_funin the driver, which simply returnsFIXEDPT_ONE(a sensitivity of 1.0), ensuring no acceleration is applied.AllParamArgsto correctly handleNoAccelmode, passing the emptyNoAccelCurveParams.CLI Enhancements:
maccelCLI to supportNoAccelmode for setting and getting parameters.set_all_no_accelandget_all_no_accelcommands are now available, though setting parameters for this mode is a no-op as there are none.Driver Integration:
accel.hto includeno_accel.hand addno_accelto the__accel_argsunion.accel_modeenum to includeno_accel.__no_accel_sens_funinto the mainsensitivityfunction.TUI Integration:
NoAccelmode in the TUI, displaying its parameters (which are none) and a sensitivity graph.NoAccelmode dynamically adjusts its Y-axis bounds based on theSensMultparameter, ensuring a clear visualization of the 1:1 sensitivity.Testing:
test_no_accel_accelerationto the driver tests to verify the correct behavior of theNoAccelmode, ensuring a constant sensitivity of 1.0.This new mode provides a convenient way for users to disable acceleration entirely without needing to manually configure other modes to achieve a flat curve.