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] Passive devices do not stop when program ends #226

Closed
laurensvalk opened this issue Jan 22, 2021 · 1 comment
Closed

[Bug] Passive devices do not stop when program ends #226

laurensvalk opened this issue Jan 22, 2021 · 1 comment
Labels
bug Something isn't working platform: Powered Up Issues related to LEGO Powered Up software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: motors Issues involving motors topic: sensors Issues involving sensors

Comments

@laurensvalk
Copy link
Member

Describe the bug
Passive devices such as train motors or lights aren't automatically turned off when the program ends.

This is a known issue that was "intentionally" introduced as a workaround to keep the power on for the Ultrasonic/Color sensor while fixing the hotplugging issue.

But it needs to get fixed for the upcoming 3.0 release. We don't want a train to keep running when you stop it.

To reproduce

from pybricks.pupdevices import DCMotor
from pybricks.parameters import Port
from pybricks.tools import wait

# Start the motor
motor = DCMotor(Port.C)
motor.dc(50)

# Wait a second
wait(1000)

# The motor should stop automatically here, but it does not
@laurensvalk laurensvalk added bug Something isn't working platform: Powered Up Issues related to LEGO Powered Up topic: motors Issues involving motors topic: sensors Issues involving sensors software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) labels Jan 22, 2021
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Jan 22, 2021
This ensures that devices like train motors stop when the program ends. Fixes pybricks/support#226
@laurensvalk
Copy link
Member Author

@Nelvarion - today's release fixes this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: Powered Up Issues related to LEGO Powered Up software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: motors Issues involving motors topic: sensors Issues involving sensors
Projects
None yet
Development

No branches or pull requests

1 participant