Skip to content

Commit

Permalink
Swerve docs (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Superbro525Alt committed Jan 14, 2024
1 parent 532f2e8 commit 5f81fcb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/content/docs/reference/drivetrain/swerve-drive.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ A struct of speeds for the swervedrive.
### Example

```cpp
swerveDrive->SetFieldRelativeVelocity({1_mps, 1_mps, 1_rad_per_s});
swerveDrive->SetFieldRelativeVelocity(wom::FieldRelativeSpeeds{1_mps, 1_mps, 1_rad_per_s});
```
## Methods
Expand All @@ -83,7 +83,7 @@ void RotateMatchJoystick(units::radian_t joystickAngle, wom::FieldRelativeSpeeds
#### Usage

```cpp
swerveDrive->RotateMatchJoystick(1_rad, {1_mps, 1_mps, 1_rad_per_s});
swerveDrive->RotateMatchJoystick(1_rad, wom::FieldRelativeSpeeds{1_mps, 1_mps, 1_rad_per_s});
```
### SetIdle
Expand Down Expand Up @@ -117,7 +117,7 @@ void SetVelocity(frc::ChassisSpeeds speeds)
#### Usage
```cpp
swerveDrive->SetVelocity({1_mps, 1_mps, 1_rad_per_s});
swerveDrive->SetVelocity(frc::ChassisSpeeds());
```

### SetFieldRelativeVelocity
Expand All @@ -133,7 +133,7 @@ void SetFieldRelativeVelocity(wom::FieldRelativeSpeeds speeds)
#### Usage
```cpp
swerveDrive->SetFieldRelativeVelocity({1_mps, 1_mps, 1_rad_per_s});
swerveDrive->SetFieldRelativeVelocity(wom::FieldRelativeSpeeds{1_mps, 1_mps, 1_rad_per_s});
```

### SetPose
Expand Down Expand Up @@ -281,7 +281,7 @@ void ResetPose(frc::Pose2d pose)
#### Usage
```cpp
swerveDrive->ResetPose({1_m, 1_m, 1_rad});
swerveDrive->ResetPose(frc::Pose2d());
```

### GetPose
Expand All @@ -305,7 +305,7 @@ void AddVisionMeasurement(frc::Pose2d pose, units::second_t timestamp)
#### Usage
```cpp
swerveDrive->AddVisionMeasurement({1_m, 1_m, 1_rad}, 1_s);
swerveDrive->AddVisionMeasurement(frc::Pose2d(), 1_s);
```

### GetConfig
Expand Down Expand Up @@ -348,7 +348,7 @@ SwerveModule *swerveModule = new SwerveModule(config);
##### Example

```cpp
SwerveModuleConfig config = {
SwerveModuleConfig config{
frc::Translation2d(1_m, 1_m),
driveMotor,
turnMotor,
Expand Down

0 comments on commit 5f81fcb

Please sign in to comment.