mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[robotpy] Mirror most other subprojects (#8208)
GitOrigin-RevId: ac60fd3cf4a24023184376687da28373d14b781a This mirrors the robotpy files for the following projects: - apriltag - datalog - hal - ntcore - romiVendordep - wpilibc - wpimath - xrpVendordep This excludes cscore and the halsim wrappers for at this time. NOTE: This does not hook these projects up to the build system, just simply mirrors the files. The building will take place in a follow up PR to make it easier to review the changes necessary to build.
This commit is contained in:
36
wpilibc/src/main/python/wpilib/simulation/simulation.cpp
Normal file
36
wpilibc/src/main/python/wpilib/simulation/simulation.cpp
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
#include "semiwrap_init.wpilib.simulation._simulation.hpp"
|
||||
|
||||
#ifndef __FRC_SYSTEMCORE__
|
||||
|
||||
namespace frc::impl {
|
||||
void ResetSmartDashboardInstance();
|
||||
void ResetMotorSafety();
|
||||
} // namespace frc::impl
|
||||
|
||||
namespace wpi::impl {
|
||||
void ResetSendableRegistry();
|
||||
} // namespace wpi::impl
|
||||
|
||||
void resetWpilibSimulationData() {
|
||||
frc::impl::ResetSmartDashboardInstance();
|
||||
frc::impl::ResetMotorSafety();
|
||||
wpi::impl::ResetSendableRegistry();
|
||||
}
|
||||
|
||||
void resetMotorSafety() {
|
||||
frc::impl::ResetMotorSafety();
|
||||
}
|
||||
|
||||
#else
|
||||
void resetWpilibSimulationData() {}
|
||||
void resetMotorSafety() {}
|
||||
#endif
|
||||
|
||||
SEMIWRAP_PYBIND11_MODULE(m) {
|
||||
initWrapper(m);
|
||||
|
||||
m.def("_resetWpilibSimulationData", &resetWpilibSimulationData,
|
||||
release_gil());
|
||||
m.def("_resetMotorSafety", &resetMotorSafety, release_gil());
|
||||
}
|
||||
Reference in New Issue
Block a user