[wpiutil] Move Color and Color8Bit from wpilib to wpiutil (#8437)

Removes one of the org.wpilib.util package conflicts for modularization.

Only a few minor tweaks were required to remove the wpimath dependency.
This commit is contained in:
Peter Johnson
2025-11-30 11:11:48 -08:00
committed by GitHub
parent e902a98601
commit 42992953ed
32 changed files with 468 additions and 385 deletions

View File

@@ -20,11 +20,11 @@ inline_code: |-
.def("getName", [](MechanismRoot2d *self) { return self->GetName(); }, release_gil())
.def("appendLigament", [](MechanismRoot2d *self,
std::string_view name, double length, wpi::units::degree_t angle,
double lineWidth, const wpi::Color8Bit& color) {
double lineWidth, const wpi::util::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") = wpi::Color8Bit{235, 137, 52},
py::arg("lineWidth") = 6, py::arg("color") = wpi::util::Color8Bit{235, 137, 52},
release_gil(), "Append a ligament node",
py::return_value_policy::reference_internal)
;