mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[copybara] Resync robotpy (#8585)
Project import generated by Copybara.
GitOrigin-RevId: fd000778e9b78c72cc7ca7b2ebe476129b78c6e0
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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")
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
functions:
|
||||
SetRuntimeType:
|
||||
WaitForProgramStart:
|
||||
ignore: true
|
||||
SetProgramStarted:
|
||||
GetProgramStarted:
|
||||
SetProgramState:
|
||||
|
||||
@@ -7,7 +7,6 @@ import typing
|
||||
|
||||
import wpilib
|
||||
|
||||
|
||||
logger = logging.getLogger("robot.sim")
|
||||
|
||||
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user