Skip to content

Conversation

@laurensvalk
Copy link
Member

This simplifies the button enum to make them more suitable beyond just pbio-specific keypad mappings. This will let them be used for other devices, like the Xbox Controller. (pybricks/support#1488)

This also saves about 100 bytes on Move Hub. About half of this comes from omitting buttons that can't be used on Move Hub or with the remote, which we could theoretically also get without the dynamic enum (pybricks/support#1453)

@coveralls
Copy link

coveralls commented Feb 27, 2024

Coverage Status

coverage: 55.495% (-0.2%) from 55.685%
when pulling 1b6b61e on buttons
into 4d3d855 on master.

This simplifies the button enum to make them more suitable beyond just pbio-specific keypad mappings. This will let them be used for other devices, like the Xbox Controller.

This also saves about 200 bytes on Move Hub. Some of this comes from omitting buttons that can't be used on Move Hub or with the remote anyway.
@laurensvalk
Copy link
Member Author

Got this down to about 200 bytes of savings, so it's probably worth the extra RAM used in scripts with buttons.

@laurensvalk laurensvalk merged commit 79a97bb into master Feb 28, 2024
@laurensvalk laurensvalk deleted the buttons branch February 28, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants