Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions subprojects/robotpy-wpilib/wpilib/simulation/simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@ RPYBUILD_PYBIND11_MODULE(m) {
m.def("_resetWpilibSimulationData", &resetWpilibSimulationData,
release_gil());
m.def("_resetMotorSafety", &resetMotorSafety, release_gil());

#ifndef __FRC_ROBORIO__
// ensure that the shuffleboard data is released when python shuts down
static int unused; // the capsule needs something to reference
py::capsule cleanup(&unused, [](void *) {
frc::impl::ResetShuffleboardInstance();
});
m.add_object("_sf_cleanup", cleanup);
#endif
}
Loading