Advanced Motor Control - #15
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors motor command calculations by extracting them from FSMTask into a dedicated motor driver, introducing configurable max-current modes (steps or piecewise linear segments) and handling current ramping and rollover speed limiting. Feedback on the implementation highlights two issues with the pedal deadzone logic: in motor_get_pwr_current, checking the deadzone after scaling the pedal value artificially inflates the deadzone threshold and causes a sudden torque step; in motor_get_drive_current, exceeding the deadzone threshold results in a step discontinuity instead of a smooth transition. Both issues can be resolved by applying the deadzone directly to the raw pedal input and using a smooth linear mapping.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.