Skip to content

Commit 439d385

Browse files
committed
Flatten wpilib namespace
- Keeping wpilib.simulation and wpilib.sysid since they're fairly distinct
1 parent 82bfc8c commit 439d385

25 files changed

+40
-127
lines changed

docs/conf.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@
6060

6161
# WPILib
6262
gen_package(root, "wpilib", exclude=["wpi_*"])
63-
gen_package(root, "wpilib.counter")
64-
gen_package(root, "wpilib.event")
65-
gen_package(root, "wpilib.drive")
66-
gen_package(root, "wpilib.interfaces")
67-
gen_package(root, "wpilib.shuffleboard")
6863
gen_package(root, "wpilib.simulation")
6964
gen_package(root, "wpilib.sysid")
7065

subprojects/robotpy-wpilib/meson.build

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@ wpilib_sources += files(
1212
'wpilib/src/rpy/MotorControllerGroup.cpp',
1313
)
1414

15-
wpilib_counter_sources += files(
16-
'wpilib/counter/counter.cpp',
17-
)
18-
19-
wpilib_drive_sources += files(
20-
'wpilib/drive/drive.cpp',
21-
)
22-
23-
wpilib_event_sources += files(
24-
'wpilib/event/event.cpp',
25-
)
26-
2715
wpilib_simulation_sources += files(
2816
'wpilib/simulation/simulation.cpp',
2917
)

subprojects/robotpy-wpilib/pyproject.toml

Lines changed: 16 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ packages = ["wpilib"]
5050
[tool.semiwrap]
5151
update_init = [
5252
"wpilib",
53-
"wpilib.counter",
54-
"wpilib.drive",
55-
"wpilib.event",
56-
"wpilib.interfaces wpilib._wpilib.interfaces",
5753
"wpilib.simulation",
5854
"wpilib.sysid wpilib._wpilib.sysid",
5955
]
@@ -79,8 +75,7 @@ name = "wpilib"
7975
wraps = ["robotpy-native-wpilib"]
8076
depends = [
8177
"wpihal", "wpiutil", "ntcore",
82-
"wpimath", "wpimath_geometry", "wpimath_controls",
83-
"wpilib_event"
78+
"wpimath", "wpimath_geometry", "wpimath_controls", "wpimath_filter",
8479
]
8580
includes = ["wpilib/src"]
8681

@@ -93,6 +88,16 @@ Filesystem = "rpy/Filesystem.h"
9388
MotorControllerGroup = "rpy/MotorControllerGroup.h"
9489
Notifier = "rpy/Notifier.h"
9590

91+
# wpi/counter
92+
EdgeConfiguration = "wpi/counter/EdgeConfiguration.hpp"
93+
Tachometer = "wpi/counter/Tachometer.hpp"
94+
UpDownCounter = "wpi/counter/UpDownCounter.hpp"
95+
96+
# wpi/drive
97+
DifferentialDrive = "wpi/drive/DifferentialDrive.hpp"
98+
MecanumDrive = "wpi/drive/MecanumDrive.hpp"
99+
RobotDriveBase = "wpi/drive/RobotDriveBase.hpp"
100+
96101
# wpi/driverstation
97102
DSControlWord = "wpi/driverstation/DSControlWord.hpp"
98103
DriverStation = "wpi/driverstation/DriverStation.hpp"
@@ -104,6 +109,11 @@ PS5Controller = "wpi/driverstation/PS5Controller.hpp"
104109
StadiaController = "wpi/driverstation/StadiaController.hpp"
105110
XboxController = "wpi/driverstation/XboxController.hpp"
106111

112+
# wpi/event
113+
BooleanEvent = "wpi/event/BooleanEvent.hpp"
114+
EventLoop = "wpi/event/EventLoop.hpp"
115+
NetworkBooleanEvent = "wpi/event/NetworkBooleanEvent.hpp"
116+
107117
# wpi/framework
108118
IterativeRobotBase = "wpi/framework/IterativeRobotBase.hpp"
109119
RobotBase = "wpi/framework/RobotBase.hpp"
@@ -214,46 +224,6 @@ Preferences = "wpi/util/Preferences.hpp"
214224
SensorUtil = "wpi/util/SensorUtil.hpp"
215225

216226

217-
[tool.semiwrap.extension_modules."wpilib.counter._counter"]
218-
name = "wpilib_counter"
219-
wraps = ["robotpy-native-wpilib"]
220-
depends = ["wpilib"]
221-
yaml_path = "semiwrap/counter"
222-
223-
[tool.semiwrap.extension_modules."wpilib.counter._counter".headers]
224-
# wpi/counter
225-
EdgeConfiguration = "wpi/counter/EdgeConfiguration.hpp"
226-
Tachometer = "wpi/counter/Tachometer.hpp"
227-
UpDownCounter = "wpi/counter/UpDownCounter.hpp"
228-
229-
230-
[tool.semiwrap.extension_modules."wpilib.drive._drive"]
231-
name = "wpilib_drive"
232-
wraps = ["robotpy-native-wpilib"]
233-
depends = ["wpilib"]
234-
yaml_path = "semiwrap/drive"
235-
236-
[tool.semiwrap.extension_modules."wpilib.drive._drive".headers]
237-
# wpi/drive
238-
DifferentialDrive = "wpi/drive/DifferentialDrive.hpp"
239-
MecanumDrive = "wpi/drive/MecanumDrive.hpp"
240-
RobotDriveBase = "wpi/drive/RobotDriveBase.hpp"
241-
242-
243-
[tool.semiwrap.extension_modules."wpilib.event._event"]
244-
name = "wpilib_event"
245-
wraps = ["robotpy-native-wpilib"]
246-
# depends = ["wpilib", "wpimath_filter"]
247-
depends = ["wpimath_filter"]
248-
yaml_path = "semiwrap/event"
249-
250-
[tool.semiwrap.extension_modules."wpilib.event._event".headers]
251-
# wpi/event
252-
BooleanEvent = "wpi/event/BooleanEvent.hpp"
253-
EventLoop = "wpi/event/EventLoop.hpp"
254-
NetworkBooleanEvent = "wpi/event/NetworkBooleanEvent.hpp"
255-
256-
257227
[tool.semiwrap.extension_modules."wpilib.simulation._simulation"]
258228
name = "wpilib_simulation"
259229
wraps = ["robotpy-native-wpilib"]

subprojects/robotpy-wpilib/semiwrap/event/BooleanEvent.yml renamed to subprojects/robotpy-wpilib/semiwrap/BooleanEvent.yml

File renamed without changes.

subprojects/robotpy-wpilib/semiwrap/CounterBase.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
defaults:
2-
subpackage: interfaces
3-
41
classes:
52
wpi::CounterBase:
63
enums:

subprojects/robotpy-wpilib/semiwrap/drive/DifferentialDrive.yml renamed to subprojects/robotpy-wpilib/semiwrap/DifferentialDrive.yml

File renamed without changes.

subprojects/robotpy-wpilib/semiwrap/counter/EdgeConfiguration.yml renamed to subprojects/robotpy-wpilib/semiwrap/EdgeConfiguration.yml

File renamed without changes.
File renamed without changes.

subprojects/robotpy-wpilib/semiwrap/GenericHID.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
defaults:
2-
subpackage: interfaces
3-
41
extra_includes:
52
- wpi/driverstation/DriverStation.hpp
63
- wpi/event/BooleanEvent.hpp

subprojects/robotpy-wpilib/semiwrap/drive/MecanumDrive.yml renamed to subprojects/robotpy-wpilib/semiwrap/MecanumDrive.yml

File renamed without changes.

0 commit comments

Comments
 (0)