Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foc refactoring #340

Merged
merged 4 commits into from
Dec 1, 2023
Merged

Foc refactoring #340

merged 4 commits into from
Dec 1, 2023

Conversation

Candas1
Copy link
Collaborator

@Candas1 Candas1 commented Nov 19, 2023

This is the refactoring I mentioned about here.
It prevents the code duplication in getDCcurrents and getfoccurrents, this will make future changes in the Clarke transform easier (e.g. using the best 2 phases)
getDQCurrents could be used when implementing FOC for stepper motors.

This shouldn't change how FOC works.

@Candas1 Candas1 marked this pull request as ready for review November 19, 2023 18:42
@runger1101001
Copy link
Member

Hey, you didn't include speed comparison, but I assume you compared it? Is there a performance impact?

Looks great to me!

@Candas1
Copy link
Collaborator Author

Candas1 commented Nov 19, 2023

It is very similar:

Before:
RAM: [= ] 9.0% (used 4428 bytes from 49152 bytes)
Flash: [=== ] 26.8% (used 70280 bytes from 262144 bytes)
loopfoc=280us

After:
RAM: [= ] 9.0% (used 4428 bytes from 49152 bytes)
Flash: [=== ] 26.8% (used 70224 bytes from 262144 bytes)
loopfoc=280us

@runger1101001 runger1101001 added this to the 2.3.3_Release milestone Nov 28, 2023
@runger1101001 runger1101001 merged commit 030508f into simplefoc:dev Dec 1, 2023
16 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.

2 participants