Merge branch 'main' into 2027

This commit is contained in:
Peter Johnson
2025-01-16 23:17:59 -08:00
92 changed files with 2748 additions and 534 deletions

View File

@@ -19,10 +19,10 @@
namespace frc {
/**
* A class for driving addressable LEDs, such as WS2812Bs and NeoPixels.
* A class for driving addressable LEDs, such as WS2812B, WS2815, and NeoPixels.
*
* By default, the timing supports WS2812B LEDs, but is configurable using
* SetBitTiming()
* By default, the timing supports WS2812B and WS2815 LEDs, but is configurable
* using SetBitTiming()
*
* <p>Only 1 LED driver is currently supported by the roboRIO. However,
* multiple LED strips can be connected in series and controlled from the
@@ -130,8 +130,8 @@ class AddressableLED {
/**
* Sets the bit timing.
*
* <p>By default, the driver is set up to drive WS2812Bs, so nothing needs to
* be set for those.
* <p>By default, the driver is set up to drive WS2812B and WS2815, so nothing
* needs to be set for those.
*
* @param highTime0 high time for 0 bit (default 400ns)
* @param lowTime0 low time for 0 bit (default 900ns)
@@ -146,7 +146,7 @@ class AddressableLED {
* Sets the sync time.
*
* <p>The sync time is the time to hold output so LEDs enable. Default set for
* WS2812B.
* WS2812B and WS2815.
*
* @param syncTime the sync time (default 280us)
*/

View File

@@ -45,6 +45,20 @@ class DCMotorSim : public LinearSystemSim<2, 1, 2> {
void SetState(units::radian_t angularPosition,
units::radians_per_second_t angularVelocity);
/**
* Sets the DC motor's angular position.
*
* @param angularPosition The new position in radians.
*/
void SetAngle(units::radian_t angularPosition);
/**
* Sets the DC motor's angular velocity.
*
* @param angularVelocity The new velocity in radians per second.
*/
void SetAngularVelocity(units::radians_per_second_t angularVelocity);
/**
* Returns the DC motor position.
*
@@ -97,17 +111,17 @@ class DCMotorSim : public LinearSystemSim<2, 1, 2> {
/**
* Returns the gearbox.
*/
const DCMotor& Gearbox() const { return m_gearbox; }
const DCMotor& GetGearbox() const;
/**
* Returns the gearing;
*/
double Gearing() const { return m_gearing; }
double GetGearing() const;
/**
* Returns the moment of inertia
*/
units::kilogram_square_meter_t J() const { return m_j; }
units::kilogram_square_meter_t GetJ() const;
private:
DCMotor m_gearbox;