[copybara] Resync robotpy (#8585)

Project import generated by Copybara.
    
GitOrigin-RevId: fd000778e9b78c72cc7ca7b2ebe476129b78c6e0
This commit is contained in:
PJ Reiniger
2026-02-08 10:36:35 -05:00
committed by GitHub
parent 4aa21e947d
commit 227c89ab23
53 changed files with 1049 additions and 170 deletions

View File

@@ -1,7 +1,7 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"semiwrap~=0.2.1",
"semiwrap~=0.2.6",
"hatch-meson~=0.1.0",
"hatch-robotpy~=0.2.1",
"hatchling",

View File

@@ -19,3 +19,32 @@ classes:
Rising:
Falling:
Debounce:
inline_code: |
.def("negate", [](BooleanEvent &self) {
return !self;
},
py::doc("Returns a BooleanEvent that is active when this event is inactive."))
.def("and_", [](BooleanEvent &self, BooleanEvent &other) {
return self && static_cast<std::function<bool()>>(other);
},
py::arg("other"),
py::doc("Compose this event with another event")
)
.def("and_", [](BooleanEvent &self, std::function<bool()> other) {
return self && other;
},
py::arg("other"),
py::doc("Compose this event with a callable")
)
.def("or_", [](BooleanEvent &self, BooleanEvent &other) {
return self || static_cast<std::function<bool()>>(other);
},
py::arg("other"),
py::doc("Compose this event with another event")
)
.def("or_", [](BooleanEvent &self, std::function<bool()> other) {
return self || other;
},
py::arg("other"),
py::doc("Compose this event with a callable")
)

View File

@@ -1,6 +1,7 @@
functions:
SetRuntimeType:
WaitForProgramStart:
ignore: true
SetProgramStarted:
GetProgramStarted:
SetProgramState:

View File

@@ -7,7 +7,6 @@ import typing
import wpilib
logger = logging.getLogger("robot.sim")

View File

@@ -56,7 +56,6 @@ from ._simulation import (
setRuntimeType,
stepTiming,
stepTimingAsync,
waitForProgramStart,
)
__all__ = [
@@ -114,7 +113,10 @@ __all__ = [
"setRuntimeType",
"stepTiming",
"stepTimingAsync",
"waitForProgramStart",
]
del _init__simulation
from hal.simulation import waitForProgramStart
__all__ += ["waitForProgramStart"]