Skip to content

refactor(core): split FocDriver and PhaseManager into modules - #7

Merged
okhsunrog merged 2 commits into
mainfrom
refactor/split-foc-modules
Oct 26, 2026
Merged

okhsunrog merged 2 commits into
mainfrom
refactor/split-foc-modules

Conversation

@okhsunrog

Copy link
Copy Markdown
Owner

Split FocDriver and PhaseManager into modules so the hot path and the mode arms can be reviewed on their own. Control behavior is unchanged, and the public paths stay the same.

  • foc_driver: driver, step, modes, protection, failsafe, and current-offset calibration
  • phase/manager: constructors, accessors, hall health, the commutation tracker, source selection, and the PhaseProvider impl
  • step() sequences named helpers that stay inlined on the ISR entry points

Made with Cursor

The driver and phase manager had grown into single files of several thousand lines, which made the hot path and the mode arms hard to review. Move them into directories without changing control behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@okhsunrog
okhsunrog force-pushed the refactor/split-foc-modules branch from 8f9027a to 5c49a16 Compare October 19, 2026 17:55
@okhsunrog
okhsunrog changed the base branch from experiment/core-float-math to main October 19, 2026 17:56
@okhsunrog
okhsunrog merged commit e3ceacc into main Oct 26, 2026
14 checks passed
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.

1 participant