[wpilib] MechanismLigament2d: Add getters for color and line weight (#3947)

Also add missing locking in C++.
This commit is contained in:
Peter Johnson
2022-01-21 15:47:44 -08:00
committed by GitHub
parent 5548a37465
commit 830c0c5c2f
3 changed files with 75 additions and 1 deletions

View File

@@ -34,7 +34,14 @@ class MechanismLigament2d : public MechanismObject2d {
*
* @param color the color of the line
*/
void SetColor(const frc::Color8Bit& color);
void SetColor(const Color8Bit& color);
/**
* Get the ligament color.
*
* @return the color of the line
*/
Color8Bit GetColor();
/**
* Set the ligament's length.
@@ -71,6 +78,13 @@ class MechanismLigament2d : public MechanismObject2d {
*/
void SetLineWeight(double lineWidth);
/**
* Get the line thickness.
*
* @return the line thickness
*/
double GetLineWeight();
protected:
void UpdateEntries(std::shared_ptr<nt::NetworkTable> table) override;