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

[Bug] Motor.run_time does not end if blocked #903

Closed
laurensvalk opened this issue Jan 6, 2023 · 0 comments
Closed

[Bug] Motor.run_time does not end if blocked #903

laurensvalk opened this issue Jan 6, 2023 · 0 comments
Labels
bug Something isn't working topic: control Issues involving control system algorithms topic: motors Issues involving motors

Comments

@laurensvalk
Copy link
Member

Describe the bug
Motor.run_time does not end if blocked mechanically.

To reproduce

On the REPL, do:

m = Motor(Port.A)
m.run_time(500, 2000)

Expected behavior
This is supposed to complete after 2 seconds in all cases, but it blocks indefinitely if the motor is held still.

@laurensvalk laurensvalk added bug Something isn't working topic: motors Issues involving motors topic: control Issues involving control system algorithms labels Jan 6, 2023
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Jan 6, 2023
Under load, the reference angle can be far ahead of the measured angle. If we try to hold that (unreachable) angle, the run_time command never completes.

Fixes: pybricks/support#903
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic: control Issues involving control system algorithms topic: motors Issues involving motors
Projects
None yet
Development

No branches or pull requests

1 participant