[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:
PJ Reiniger
2025-10-24 01:28:04 -04:00
committed by GitHub
parent 8992dcdc99
commit 44b9cc1398
545 changed files with 27293 additions and 38 deletions

View File

@@ -0,0 +1,62 @@
extra_includes:
- frc/DriverStation.h
- rpy/ControlWord.h
functions:
# TODO
RunHALInitialization:
ignore: true
RunRobot:
ignore: true
StartRobot:
ignore: true
ResetMotorSafety:
ignore: true
classes:
frc::RobotBase:
attributes:
m_threadId:
ignore: true
connListenerHandle:
ignore: true
methods:
IsEnabled:
IsDisabled:
IsAutonomous:
IsAutonomousEnabled:
IsTeleop:
IsTeleopEnabled:
IsTest:
IsTestEnabled:
GetThreadId:
ignore: true
StartCompetition:
EndCompetition:
GetRuntimeType:
IsReal:
IsSimulation:
RobotBase:
inline_code: |
.def_static("main",
[](py::object robot_cls) -> py::object {
auto start = py::module::import("wpilib._impl.start");
auto starter = start.attr("RobotStarter")();
return starter.attr("run")(robot_cls);
},
py::arg("robot_cls"), py::doc("Starting point for the application"))
.def(
"getControlState",
[](RobotBase *self) -> std::tuple<bool, bool, bool> {
py::gil_scoped_release release;
return rpy::GetControlState();
},
py::doc("More efficient way to determine what state the robot is in.\n"
"\n"
":returns: booleans representing enabled, isautonomous, istest\n"
"\n"
".. versionadded:: 2019.2.1\n"
"\n"
".. note:: This function only exists in RobotPy\n"));
auto logger = py::module::import("logging").attr("getLogger")("robot");
cls_RobotBase.attr("logger") = logger;