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

Add error handling if currentX and currentY are not aligned with unit spaces #147

Open
nashirj opened this issue Feb 9, 2022 · 0 comments
Labels
Hardware Team Arduino, Electrical, Mechanical Low Priority Will be addressed later

Comments

@nashirj
Copy link
Member

nashirj commented Feb 9, 2022

moveStraight and moveDiagonal assume that the EM is aligned with a unit space. Should add a check to those functions to make sure that we are aligned before moving.

// Before starting movement
if ((currentX % stepsPerUnitSpace) || (currentY % stepsPerUnitSpace)) {
    // Align to a unit space or raise an error or something
}
@nashirj nashirj added Hardware Team Arduino, Electrical, Mechanical Low Priority Will be addressed later labels Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware Team Arduino, Electrical, Mechanical Low Priority Will be addressed later
Projects
None yet
Development

No branches or pull requests

1 participant