|
I'm trying to use FastAccelStepper inside a custom stepper class. So far I could only get this working by initializing the engine globally and passing it to an init() method of my class that is called inside the setup function. Is it possible to "hide" the engine e.g. as a static member inside my stepper class? Or at least pass it as a constructor argument to the stepper class so no extra init method is needed? |
Answered by
gin66
Nov 6, 2022
Replies: 1 comment 1 reply
|
Never tried this, but I assume, that the FastAccelStepperEngine instance could be stored anywhere, even inside your own class. Eventually you need to check, if the engine has been initialized and make sure, the engine is initialized only once. |
1 reply
Answer selected by
DreiDe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Never tried this, but I assume, that the FastAccelStepperEngine instance could be stored anywhere, even inside your own class. Eventually you need to check, if the engine has been initialized and make sure, the engine is initialized only once.