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

[Feature] Group hub system functions under hub.system #321

Closed
laurensvalk opened this issue May 1, 2021 · 0 comments
Closed

[Feature] Group hub system functions under hub.system #321

laurensvalk opened this issue May 1, 2021 · 0 comments
Labels
software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: MicroPython Issues related to the MicroPython programming language

Comments

@laurensvalk
Copy link
Member

Originally posted by @laurensvalk in #272 (comment)

It would be nice to group system functions, perhaps like this:

hub.system.set_stop_button()
hub.system.reset()
hub.system.reset_reason()

There may also be a few read only attributes like bluetooth_address. If we have a lot of them maybe these can be put in a dictionary like this:

hub.system.info()

Other system related things:

  • Used / free flash space (Prime Hub / Inventor Hub)
  • uptime ?
  • Hardware version
  • Hub name (We have an open issue for a use case somewhere)
@dlech dlech added software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: MicroPython Issues related to the MicroPython programming language labels May 1, 2021
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue May 26, 2021
This will group various system functions such as resetting and system data such as bluetooth address: pybricks/support#321

For now, the system attribute will be constant and read-only, so we can use a constant instance to save some code size and RAM.
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue May 26, 2021
@dlech dlech closed this as completed Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: MicroPython Issues related to the MicroPython programming language
Projects
None yet
Development

No branches or pull requests

2 participants