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

isMoving implementation #43

Open
jerryg2003 opened this issue Sep 25, 2021 · 0 comments
Open

isMoving implementation #43

jerryg2003 opened this issue Sep 25, 2021 · 0 comments

Comments

@jerryg2003
Copy link

jerryg2003 commented Sep 25, 2021

The documentation implies this exists but it is a "To Do" in the code. I made a simple implementation of this function if you are interested. Added an argument to make it easier. Mimics the code under "write" with wait=true.

bool VarSpeedServo::isMoving(int value) {
if (value < MIN_PULSE_WIDTH) {
if (read() != value) return(true);
} else {
if (readMicroseconds() != value) return(true);
}
return(false);
}

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

1 participant