Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[STEPPER] Improvements to C++ code #7060

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

Closed
steve-weinrich wants to merge 1 commit into arduino:master from steve-weinrich:Stepper-C++-Improvements
Closed

[STEPPER] Improvements to C++ code #7060

steve-weinrich wants to merge 1 commit into arduino:master from steve-weinrich:Stepper-C++-Improvements

Conversation

Copy link

@steve-weinrich steve-weinrich commented Dec 29, 2017

  • There are no functionality or interface changes. Just C++ improvements.
  • Use a "pointer to member function" to divide "stepMotor" into discrete methods.
  • Remove unnecessary use of "this".
  • Add a common initialization method for use by all constructors.
  • Add appropriate use of "const".
  • Remove "direction" from class as it was only used in one method.
  • Add "numberOfPositions" so that the "step" method does not need to test the motor type.
  • Change the "motorPins" into an array to make common initialization easier.
  • Use camel case variable names instead of underscores.

@facchinm facchinm added the Library: Stepper The Stepper Arduino library label Jan 8, 2018
@facchinm facchinm changed the title (削除) Improvements to C++ code (削除ここまで) (追記) [STEPPER] Improvements to C++ code (追記ここまで) Jan 8, 2018
Copy link
Member

facchinm commented Jan 8, 2018

Hi @steve-weinrich ,
would you mind moving the PR to https://github.com/arduino-libraries/Stepper/pulls ? Thanks

Copy link
Author

steve-weinrich commented Jan 9, 2018 via email

Howdy, No problem. Do you want me to integrate the other PR’s into this? Or just certain ones? Or none? Cheers. From: Martino Facchin [mailto:notifications@github.com] Sent: Monday, January 8, 2018 03:45 To: arduino/Arduino <Arduino@noreply.github.com> Cc: steve-weinrich <weinrich.steve@gmail.com>; Mention <mention@noreply.github.com> Subject: Re: [arduino/Arduino] [STEPPER] Improvements to C++ code (#7060) Hi @steve-weinrich <https://github.com/steve-weinrich> , would you mind moving the PR to https://github.com/arduino-libraries/Stepper/pulls ? Thanks — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#7060 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/Ag_Y2o6b6OuzAN3VxhegKA2fBsdWXKo0ks5tIfG8gaJpZM4RPThc> . <https://github.com/notifications/beacon/Ag_Y2gSv7mHA8eTnLFuNP6fKzBu2snXaks5tIfG8gaJpZM4RPThc.gif>

Copy link
Member

Feel free to create a brand new PR with all your commits included 😉

Copy link
Author

Moving to arduino-libraries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Library: Stepper The Stepper Arduino library
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /