Conversation
Tonidotpy
requested changes
Apr 30, 2026
Member
Tonidotpy
left a comment
There was a problem hiding this comment.
- In general avoid shortening names if it is not a convention of some sort (i.e. use
buttoninstead ofbtn,callbackinstead ofcb, etc...). This way there is no ambiguity of what the identifier represent - Remember to add a prefix with the filename before any identifier in the module
- There is no test for the popup module
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.
Purpose
This pull request introduces several API and structural improvements to the steering wheel firmware, focusing on modularity, clarity, and future extensibility. The main themes are a refactor of the inputs handling API, the introduction of a new parameters management module, and enhancements to the LED control interface. These changes clarify callback responsibilities, make the codebase more hardware-agnostic, and improve documentation for easier integration and maintenance.
Overview
inputs-apiinterface is redesigned to use explicit callbacks for button press, long-press, release, and knob rotation events, replacing the previous generic notify/action callbacks.parameters-api.handparameters.h), providing a single source of truth for user-facing tunable parameters (e.g., power, regen, PTT). It supports both input-driven and external updates, and broadcasts changes via a registered callback.leds_api_save_patternandleds_api_restore_patternare added, allowing the current LED state to be snapshotted and restored (useful for temporary overlays like PTT). The handler structure is updated with a backup buffer.Guidance
Mainly check the parameters module as it's the focus of the PR, but also check events, leds and inputs (both on CM4 and CM7) as most of the code changed to accommodate the new module.