Skip to content

[Bug] Undefined Pybricks Code state after hub.system.reset(1) #378

@laurensvalk

Description

@laurensvalk

Describe the bug
The run button can get stuck, after hub.system.reset(1), and stay that way even if you reconnect.

This test was done on the Technic Hub

Pybricks Code (Beta) v1.1.0-beta.1
Version 91.0.4472.101 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)

To reproduce

image

First run the script, then click play again.

from pybricks.hubs import ThisHub
from pybricks.tools import wait

hub = ThisHub()

print(hub.system.reset_reason())

hub.system.reset(1)

And this isn't too bad.

But it remains stuck after you reconnect, so a hard refresh is required.

image

Expected behavior
Disconnect as during a regular power-off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    software: pybricks-codeIssues with https://code.pybricks.com application

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions