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

LinearHall improvements and move to main repository #367

Closed
wants to merge 2 commits into from

Conversation

dekutree64
Copy link
Contributor

Changes compared to the original pull request in the drivers repository simplefoc/Arduino-FOC-drivers#12

  1. Added a version of init which turns the motor one revolution to find the center values of the sensors.
  2. Moved the calls to analogRead into a weakly bound function ReadLinearHalls so it can be overridden with custom ADC code on platforms with poor analogRead performance.
  3. Commented out the pinMode calls in init, which makes it possible to pass in ADC channel numbers for custom ReadLinearHalls to use without having to remap them every update.
  4. Changed to use the much faster _atan2 function that was added to foc_utils recently.
  5. Added examples.

Changes compared to the original pull request in the drivers repository simplefoc/Arduino-FOC-drivers#12
1. Added a version of init which turns the motor one revolution to find the center values of the sensors.
2. Moved the calls to analogRead into a weakly bound function ReadLinearHalls so it can be overridden with custom ADC code on platforms with poor analogRead performance.
3. Commented out the pinMode calls in init, which makes it possible to pass in ADC channel numbers for custom ReadLinearHalls to use without having to remap them every update.
4. Changed to use the much faster _atan2 function that was added to foc_utils recently.
5. Added examples.
@runger1101001
Copy link
Member

Hey, from my point of view I think we should add the LinearHall code in the drivers repository, and not the main repository...
While it's very cool, at the moment it's something that only very few of our users will be able to use.

@runger1101001 runger1101001 self-assigned this Jan 15, 2024
@runger1101001 runger1101001 added the enhancement New feature or request label Jan 15, 2024
@dekutree64
Copy link
Contributor Author

Closing this and opening a new PR in drivers repository

@dekutree64 dekutree64 closed this Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants