Skip to content

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
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