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

Why do I take the inverse 2 times? bool ok = !!tmcdriver[motor.id]; #15

Open
wdfk-prog opened this issue Nov 21, 2024 · 2 comments
Open

Comments

@wdfk-prog
Copy link

bool ok = !!tmcdriver[motor.id];

  • Why do I take the inverse 2 times?
@wdfk-prog
Copy link
Author

.encm_ctrl.addr.reg = TMC5160Reg_ENCM_CTRL,

  • TMC5160Reg_ENCM_CTRL No definition found

@terjeio
Copy link
Owner

terjeio commented Dec 11, 2024

Sorry for the late reply, somehow notifications were turned off for this repo.

Why do I take the inverse 2 times?

I use it as a shorthand for bool ok = tmcdriver[motor.id] != NULL; See this post.

TMC5160Reg_ENCM_CTRL No definition found

I did not bother to add it since I had no need for it.

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

No branches or pull requests

2 participants