Skip to content

Commit ee5502f

Browse files
committed
pybricks.tools: Add hub_menu function.
This implements the first approach discussed in pybricks/support#1064.
1 parent b5f40d8 commit ee5502f

File tree

12 files changed

+111
-0
lines changed

12 files changed

+111
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Added `'modes'` entry to the dictionary returned by `PUPDevice.info()`. It
99
is a tuple of `(name, num_values, data_type)` tuples for each available mode.
1010
- Added `pybricks.tools.read_input_byte()` function ([support#1102]).
11+
- Added `pybricks.tools.hub_menu()` function ([support#1064]).
1112

1213
### Changed
1314
- Changed internal drivers for LEGO devices (motors and sensors) on all platforms.
@@ -16,6 +17,7 @@
1617
- Fixed hub will not power off when Bluetooth chip crashes on City and Technic hubs ([support#1095]).
1718
- Fixed `off()` method in `ColorLightMatrix`, `UltrasonicSensor`, `ColorSensor` ([support#1098]).
1819

20+
[support#1064]: https://github.com/pybricks/support/issues/1064
1921
[support#1095]: https://github.com/pybricks/support/issues/1095
2022
[support#1098]: https://github.com/pybricks/support/issues/1098
2123
[support#1102]: https://github.com/pybricks/support/issues/1102

bricks/cityhub/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_GYRO (0)
4242
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_SPIKE (0)
4343
#define PYBRICKS_PY_TOOLS (1)
44+
#define PYBRICKS_PY_TOOLS_HUB_MENU (0)
4445

4546
// Pybricks options
4647
#define PYBRICKS_OPT_COMPILER (1)

bricks/debug/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#define PYBRICKS_PY_PUPDEVICES (0)
3737
#define PYBRICKS_PY_ROBOTICS (0)
3838
#define PYBRICKS_PY_TOOLS (1)
39+
#define PYBRICKS_PY_TOOLS_HUB_MENU (0)
3940

4041
// Pybricks options
4142
#define PYBRICKS_OPT_COMPILER (0)

bricks/essentialhub/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_GYRO (1)
4343
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_SPIKE (1)
4444
#define PYBRICKS_PY_TOOLS (1)
45+
#define PYBRICKS_PY_TOOLS_HUB_MENU (0)
4546

4647
// Pybricks options
4748
#define PYBRICKS_OPT_COMPILER (1)

bricks/ev3dev/brickconfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
#define PYBRICKS_PY_ROBOTICS (1)
4545
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_SPIKE (0)
4646
#define PYBRICKS_PY_TOOLS (1)
47+
#define PYBRICKS_PY_TOOLS_HUB_MENU (0)
4748
#define PYBRICKS_PY_USIGNAL (1)

bricks/ev3rt/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define PYBRICKS_PY_ROBOTICS (0)
4444
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_SPIKE (0)
4545
#define PYBRICKS_PY_TOOLS (1)
46+
#define PYBRICKS_PY_TOOLS_HUB_MENU (0)
4647

4748
// Pybricks options
4849
#define PYBRICKS_OPT_COMPILER (1)

bricks/movehub/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_GYRO (0)
3838
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_SPIKE (0)
3939
#define PYBRICKS_PY_TOOLS (1)
40+
#define PYBRICKS_PY_TOOLS_HUB_MENU (0)
4041

4142
// Pybricks options
4243
#define PYBRICKS_OPT_COMPILER (0)

bricks/nxt/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_GYRO (0)
4343
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_SPIKE (0)
4444
#define PYBRICKS_PY_TOOLS (1)
45+
#define PYBRICKS_PY_TOOLS_HUB_MENU (0)
4546

4647
// Pybricks options
4748
#define PYBRICKS_OPT_COMPILER (1)

bricks/primehub/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_GYRO (1)
4444
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_SPIKE (1)
4545
#define PYBRICKS_PY_TOOLS (1)
46+
#define PYBRICKS_PY_TOOLS_HUB_MENU (1)
4647

4748
// Pybricks options
4849
#define PYBRICKS_OPT_COMPILER (1)

bricks/technichub/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_GYRO (1)
4242
#define PYBRICKS_PY_ROBOTICS_DRIVEBASE_SPIKE (0)
4343
#define PYBRICKS_PY_TOOLS (1)
44+
#define PYBRICKS_PY_TOOLS_HUB_MENU (0)
4445

4546
// Pybricks options
4647
#define PYBRICKS_OPT_COMPILER (1)

0 commit comments

Comments
 (0)