We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f27a714 + a1c3f35 commit 3a43da7Copy full SHA for 3a43da7
subprojects/robotpy-wpilib/wpilib/simulation/simulation.cpp
@@ -37,4 +37,13 @@ RPYBUILD_PYBIND11_MODULE(m) {
37
m.def("_resetWpilibSimulationData", &resetWpilibSimulationData,
38
release_gil());
39
m.def("_resetMotorSafety", &resetMotorSafety, release_gil());
40
+
41
+#ifndef __FRC_ROBORIO__
42
+ // ensure that the shuffleboard data is released when python shuts down
43
+ static int unused; // the capsule needs something to reference
44
+ py::capsule cleanup(&unused, [](void *) {
45
+ frc::impl::ResetShuffleboardInstance();
46
+ });
47
+ m.add_object("_sf_cleanup", cleanup);
48
+#endif
49
}
0 commit comments