Files
allwpilib/wpilibc/src/main/python/semiwrap/MechanismObject2d.yml

32 lines
914 B
YAML
Raw Normal View History

extra_includes:
- frc/smartdashboard/MechanismLigament2d.h
classes:
frc::MechanismObject2d:
force_type_casters:
- units::degree_t
attributes:
m_mutex:
ignore: true
methods:
GetName:
Append:
ignore: true
MechanismObject2d:
ignore: true
UpdateEntries:
# keep this in sync with MechanismRoot2d.yml
inline_code: |-
cls_MechanismObject2d
.def("appendLigament", [](MechanismObject2d *self,
std::string_view name, double length, units::degree_t angle,
double lineWidth, const frc::Color8Bit& color) {
return self->Append<MechanismLigament2d>(name, length, angle, lineWidth, color);
},
py::arg("name"), py::arg("length"), py::arg("angle"),
py::arg("lineWidth") = 6, py::arg("color") = frc::Color8Bit{235, 137, 52},
"Append a ligament node",
py::return_value_policy::reference_internal)
;