Updated docs, renamed SwerveDrive lock function and setBrake function

This commit is contained in:
thenetworkgrinch
2023-02-15 22:18:27 -06:00
parent e4436b5ed2
commit e8f6ca3659
111 changed files with 3086 additions and 384 deletions

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveController</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveDrive</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -91,30 +91,30 @@ loadScripts(document, 'script');</script>
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private double</code></div>
<div class="col-second even-row-color"><code><a href="#angle" class="member-name-link">angle</a></code></div>
<div class="col-first even-row-color"><code>edu.wpi.first.wpilibj.smartdashboard.Field2d</code></div>
<div class="col-second even-row-color"><code><a href="#field" class="member-name-link">field</a></code></div>
<div class="col-last even-row-color">
<div class="block">The current angle of the robot and last time odometry during simulations.</div>
</div>
<div class="col-first odd-row-color"><code>edu.wpi.first.wpilibj.smartdashboard.Field2d</code></div>
<div class="col-second odd-row-color"><code><a href="#field" class="member-name-link">field</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Field object.</div>
</div>
<div class="col-first even-row-color"><code>private <a href="imu/SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></div>
<div class="col-second even-row-color"><code><a href="#imu" class="member-name-link">imu</a></code></div>
<div class="col-last even-row-color">
<div class="col-first odd-row-color"><code>private <a href="imu/SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></div>
<div class="col-second odd-row-color"><code><a href="#imu" class="member-name-link">imu</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Swerve IMU device for sensing the heading of the robot.</div>
</div>
<div class="col-first odd-row-color"><code>final <a href="math/SwerveKinematics2.html" title="class in swervelib.math">SwerveKinematics2</a></code></div>
<div class="col-second odd-row-color"><code><a href="#kinematics" class="member-name-link">kinematics</a></code></div>
<div class="col-last odd-row-color">
<div class="col-first even-row-color"><code>final <a href="math/SwerveKinematics2.html" title="class in swervelib.math">SwerveKinematics2</a></code></div>
<div class="col-second even-row-color"><code><a href="#kinematics" class="member-name-link">kinematics</a></code></div>
<div class="col-last even-row-color">
<div class="block">Swerve Kinematics object utilizing second order kinematics.</div>
</div>
<div class="col-first even-row-color"><code>private double</code></div>
<div class="col-second even-row-color"><code><a href="#lastTime" class="member-name-link">lastTime</a></code></div>
<div class="col-first odd-row-color"><code>private int</code></div>
<div class="col-second odd-row-color"><code><a href="#moduleSynchronizationCounter" class="member-name-link">moduleSynchronizationCounter</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Counter to synchronize the modules relative encoder with absolute encoder when not moving.</div>
</div>
<div class="col-first even-row-color"><code>private <a href="simulation/SwerveIMUSimulation.html" title="class in swervelib.simulation">SwerveIMUSimulation</a></code></div>
<div class="col-second even-row-color"><code><a href="#simIMU" class="member-name-link">simIMU</a></code></div>
<div class="col-last even-row-color">
<div class="block">The current angle of the robot and last time odometry during simulations.</div>
<div class="block">Simulation of the swerve drive.</div>
</div>
<div class="col-first odd-row-color"><code><a href="SwerveController.html" title="class in swervelib">SwerveController</a></code></div>
<div class="col-second odd-row-color"><code><a href="#swerveController" class="member-name-link">swerveController</a></code></div>
@@ -136,11 +136,6 @@ loadScripts(document, 'script');</script>
<div class="col-last even-row-color">
<div class="block">Swerve modules.</div>
</div>
<div class="col-first odd-row-color"><code>private edu.wpi.first.wpilibj.Timer</code></div>
<div class="col-second odd-row-color"><code><a href="#timer" class="member-name-link">timer</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Time during simulations.</div>
</div>
</div>
</section>
</li>
@@ -172,11 +167,12 @@ loadScripts(document, 'script');</script>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double)" class="member-name-link">addVisionMeasurement</a><wbr>(edu.wpi.first.math.geometry.Pose2d&nbsp;robotPose,
double&nbsp;timestamp)</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double,boolean)" class="member-name-link">addVisionMeasurement</a><wbr>(edu.wpi.first.math.geometry.Pose2d&nbsp;robotPose,
double&nbsp;timestamp,
boolean&nbsp;soft)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Add a vision measurement to the <code>SwerveDrivePoseEstimator</code> with the given timestamp of the vision
measurement.</div>
<div class="block">Add a vision measurement to the <code>SwerveDrivePoseEstimator</code> and update the <a href="imu/SwerveIMU.html" title="class in swervelib.imu"><code>SwerveIMU</code></a> gyro reading with
the given timestamp of the vision measurement.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)" class="member-name-link">drive</a><wbr>(edu.wpi.first.math.geometry.Translation2d&nbsp;translation,
@@ -194,7 +190,7 @@ loadScripts(document, 'script');</script>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation3d</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getGyroRotation3d()" class="member-name-link">getGyroRotation3d</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the current gyro Rotation3d of the robot, as reported by the imu.</div>
<div class="block">Gets the current gyro <code>Rotation3d</code> of the robot, as reported by the imu.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.SwerveModulePosition[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getModulePositions()" class="member-name-link">getModulePositions</a>()</code></div>
@@ -237,31 +233,31 @@ loadScripts(document, 'script');</script>
<div class="block">Gets the current yaw angle of the robot, as reported by the imu.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#postTrajectory(edu.wpi.first.math.trajectory.Trajectory)" class="member-name-link">postTrajectory</a><wbr>(edu.wpi.first.math.trajectory.Trajectory&nbsp;trajectory)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Post the trajectory to the field</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward)" class="member-name-link">replaceSwerveModuleFeedforward</a><wbr>(edu.wpi.first.math.controller.SimpleMotorFeedforward&nbsp;feedforward)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Setup the swerve module feedforward.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#resetOdometry(edu.wpi.first.math.geometry.Pose2d)" class="member-name-link">resetOdometry</a><wbr>(edu.wpi.first.math.geometry.Pose2d&nbsp;pose)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Resets odometry to the given pose.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds)" class="member-name-link">setChassisSpeeds</a><wbr>(edu.wpi.first.math.kinematics.ChassisSpeeds&nbsp;chassisSpeeds)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set chassis speeds with closed-loop velocity control.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDriveBrake()" class="member-name-link">setDriveBrake</a>()</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#lockPose()" class="member-name-link">lockPose</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Point all modules toward the robot center, thus making the robot very difficult to move.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#postTrajectory(edu.wpi.first.math.trajectory.Trajectory)" class="member-name-link">postTrajectory</a><wbr>(edu.wpi.first.math.trajectory.Trajectory&nbsp;trajectory)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Post the trajectory to the field</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward)" class="member-name-link">replaceSwerveModuleFeedforward</a><wbr>(edu.wpi.first.math.controller.SimpleMotorFeedforward&nbsp;feedforward)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Setup the swerve module feedforward.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#resetOdometry(edu.wpi.first.math.geometry.Pose2d)" class="member-name-link">resetOdometry</a><wbr>(edu.wpi.first.math.geometry.Pose2d&nbsp;pose)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Resets odometry to the given pose.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds)" class="member-name-link">setChassisSpeeds</a><wbr>(edu.wpi.first.math.kinematics.ChassisSpeeds&nbsp;chassisSpeeds)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set chassis speeds with closed-loop velocity control.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)" class="member-name-link">setModuleStates</a><wbr>(<a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]&nbsp;desiredStates,
boolean&nbsp;isOpenLoop)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
@@ -354,24 +350,17 @@ loadScripts(document, 'script');</script>
</section>
</li>
<li>
<section class="detail" id="angle">
<h3>angle</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">angle</span></div>
<div class="block">The current angle of the robot and last time odometry during simulations.</div>
<section class="detail" id="simIMU">
<h3>simIMU</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="simulation/SwerveIMUSimulation.html" title="class in swervelib.simulation">SwerveIMUSimulation</a></span>&nbsp;<span class="element-name">simIMU</span></div>
<div class="block">Simulation of the swerve drive.</div>
</section>
</li>
<li>
<section class="detail" id="lastTime">
<h3>lastTime</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">lastTime</span></div>
<div class="block">The current angle of the robot and last time odometry during simulations.</div>
</section>
</li>
<li>
<section class="detail" id="timer">
<h3>timer</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">edu.wpi.first.wpilibj.Timer</span>&nbsp;<span class="element-name">timer</span></div>
<div class="block">Time during simulations.</div>
<section class="detail" id="moduleSynchronizationCounter">
<h3>moduleSynchronizationCounter</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">moduleSynchronizationCounter</span></div>
<div class="block">Counter to synchronize the modules relative encoder with absolute encoder when not moving.</div>
</section>
</li>
</ul>
@@ -387,10 +376,11 @@ loadScripts(document, 'script');</script>
<h3>SwerveDrive</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">SwerveDrive</span><wbr><span class="parameters">(<a href="parser/SwerveDriveConfiguration.html" title="class in swervelib.parser">SwerveDriveConfiguration</a>&nbsp;config,
<a href="parser/SwerveControllerConfiguration.html" title="class in swervelib.parser">SwerveControllerConfiguration</a>&nbsp;controllerConfig)</span></div>
<div class="block">Creates a new swerve drivebase subsystem. Robot is controlled via the drive() method, or via the setModuleStates()
method. The drive() method incorporates kinematics— it takes a translation and rotation, as well as parameters for
field-centric and closed-loop velocity control. setModuleStates() takes a list of SwerveModuleStates and directly
passes them to the modules. This subsystem also handles odometry.</div>
<div class="block">Creates a new swerve drivebase subsystem. Robot is controlled via the <a href="#drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)"><code>drive(edu.wpi.first.math.geometry.Translation2d, double, boolean, boolean)</code></a> method, or via the
<a href="#setModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)"><code>setModuleStates(swervelib.math.SwerveModuleState2[], boolean)</code></a> method. The <a href="#drive(edu.wpi.first.math.geometry.Translation2d,double,boolean,boolean)"><code>drive(edu.wpi.first.math.geometry.Translation2d, double, boolean, boolean)</code></a> method incorporates kinematics— it takes
a translation and rotation, as well as parameters for field-centric and closed-loop velocity control.
<a href="#setModuleStates(swervelib.math.SwerveModuleState2%5B%5D,boolean)"><code>setModuleStates(swervelib.math.SwerveModuleState2[], boolean)</code></a> takes a list of SwerveModuleStates and directly passes them to the modules.
This subsystem also handles odometry.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>config</code> - The <a href="parser/SwerveDriveConfiguration.html" title="class in swervelib.parser"><code>SwerveDriveConfiguration</code></a> configuration to base the swerve drive off of.</dd>
@@ -578,7 +568,7 @@ loadScripts(document, 'script');</script>
<section class="detail" id="getGyroRotation3d()">
<h3>getGyroRotation3d</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">edu.wpi.first.math.geometry.Rotation3d</span>&nbsp;<span class="element-name">getGyroRotation3d</span>()</div>
<div class="block">Gets the current gyro Rotation3d of the robot, as reported by the imu.</div>
<div class="block">Gets the current gyro <code>Rotation3d</code> of the robot, as reported by the imu.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The heading as a <code>Rotation3d</code> angle</dd>
@@ -597,10 +587,11 @@ loadScripts(document, 'script');</script>
</section>
</li>
<li>
<section class="detail" id="setDriveBrake()">
<h3>setDriveBrake</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setDriveBrake</span>()</div>
<div class="block">Point all modules toward the robot center, thus making the robot very difficult to move.</div>
<section class="detail" id="lockPose()">
<h3>lockPose</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">lockPose</span>()</div>
<div class="block">Point all modules toward the robot center, thus making the robot very difficult to move. Forcing the robot to keep
the current pose.</div>
</section>
</li>
<li>
@@ -631,7 +622,9 @@ loadScripts(document, 'script');</script>
<section class="detail" id="updateOdometry()">
<h3>updateOdometry</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">updateOdometry</span>()</div>
<div class="block">Update odometry should be run every loop.</div>
<div class="block">Update odometry should be run every loop. Synchronizes module absolute encoders with relative encoders
periodically. In simulation mode will also post the pose of each module. Updates SmartDashboard with module encoder
readings and states.</div>
</section>
</li>
<li>
@@ -642,17 +635,22 @@ loadScripts(document, 'script');</script>
</section>
</li>
<li>
<section class="detail" id="addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double)">
<section class="detail" id="addVisionMeasurement(edu.wpi.first.math.geometry.Pose2d,double,boolean)">
<h3>addVisionMeasurement</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addVisionMeasurement</span><wbr><span class="parameters">(edu.wpi.first.math.geometry.Pose2d&nbsp;robotPose,
double&nbsp;timestamp)</span></div>
<div class="block">Add a vision measurement to the <code>SwerveDrivePoseEstimator</code> with the given timestamp of the vision
measurement. <b>THIS WILL BREAK IF UPDATED TOO OFTEN.</b></div>
double&nbsp;timestamp,
boolean&nbsp;soft)</span></div>
<div class="block">Add a vision measurement to the <code>SwerveDrivePoseEstimator</code> and update the <a href="imu/SwerveIMU.html" title="class in swervelib.imu"><code>SwerveIMU</code></a> gyro reading with
the given timestamp of the vision measurement. <b>THIS WILL BREAK IF UPDATED TOO OFTEN.</b></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>robotPose</code> - Robot <code>Pose2d</code> as measured by vision.</dd>
<dd><code>timestamp</code> - Timestamp the measurement was taken as time since FPGATimestamp, could be taken from
<code>Timer.getFPGATimestamp()</code>.</dd>
<dd><code>timestamp</code> - Timestamp the measurement was taken as time since startup, should be taken from
<code>Timer.getFPGATimestamp()</code> or similar sources.</dd>
<dd><code>soft</code> - Add vision estimate using the
<code>SwerveDrivePoseEstimator.addVisionMeasurement(Pose2d, double)</code> function, or hard reset
odometry with the given position with
<code>SwerveDriveOdometry.resetPosition(Rotation2d, SwerveModulePosition[], Pose2d)</code>.</dd>
</dl>
</section>
</li>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveModule</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -96,75 +96,45 @@ loadScripts(document, 'script');</script>
<div class="col-last even-row-color">
<div class="block">Absolute encoder for swerve drive.</div>
</div>
<div class="col-first odd-row-color"><code>double</code></div>
<div class="col-second odd-row-color"><code><a href="#angle" class="member-name-link">angle</a></code></div>
<div class="col-first odd-row-color"><code>private final <a href="motors/SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></code></div>
<div class="col-second odd-row-color"><code><a href="#angleMotor" class="member-name-link">angleMotor</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Current state.</div>
</div>
<div class="col-first even-row-color"><code>private final <a href="motors/SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></code></div>
<div class="col-second even-row-color"><code><a href="#angleMotor" class="member-name-link">angleMotor</a></code></div>
<div class="col-last even-row-color">
<div class="block">Swerve Motors.</div>
</div>
<div class="col-first odd-row-color"><code>private final double</code></div>
<div class="col-second odd-row-color"><code><a href="#angleOffset" class="member-name-link">angleOffset</a></code></div>
<div class="col-last odd-row-color">
<div class="col-first even-row-color"><code>private final double</code></div>
<div class="col-second even-row-color"><code><a href="#angleOffset" class="member-name-link">angleOffset</a></code></div>
<div class="col-last even-row-color">
<div class="block">Angle offset from the absolute encoder.</div>
</div>
<div class="col-first even-row-color"><code>final <a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a></code></div>
<div class="col-second even-row-color"><code><a href="#configuration" class="member-name-link">configuration</a></code></div>
<div class="col-last even-row-color">
<div class="col-first odd-row-color"><code>final <a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a></code></div>
<div class="col-second odd-row-color"><code><a href="#configuration" class="member-name-link">configuration</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Swerve module configuration options.</div>
</div>
<div class="col-first odd-row-color"><code>private final <a href="motors/SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></code></div>
<div class="col-second odd-row-color"><code><a href="#driveMotor" class="member-name-link">driveMotor</a></code></div>
<div class="col-last odd-row-color">
<div class="col-first even-row-color"><code>private final <a href="motors/SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></code></div>
<div class="col-second even-row-color"><code><a href="#driveMotor" class="member-name-link">driveMotor</a></code></div>
<div class="col-last even-row-color">
<div class="block">Swerve Motors.</div>
</div>
<div class="col-first even-row-color"><code>double</code></div>
<div class="col-second even-row-color"><code><a href="#dt" class="member-name-link">dt</a></code></div>
<div class="col-last even-row-color">
<div class="block">Current state.</div>
</div>
<div class="col-first odd-row-color"><code>double</code></div>
<div class="col-second odd-row-color"><code><a href="#fakePos" class="member-name-link">fakePos</a></code></div>
<div class="col-first odd-row-color"><code>edu.wpi.first.math.controller.SimpleMotorFeedforward</code></div>
<div class="col-second odd-row-color"><code><a href="#feedforward" class="member-name-link">feedforward</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Current state.</div>
</div>
<div class="col-first even-row-color"><code>edu.wpi.first.math.controller.SimpleMotorFeedforward</code></div>
<div class="col-second even-row-color"><code><a href="#feedforward" class="member-name-link">feedforward</a></code></div>
<div class="col-last even-row-color">
<div class="block">Feedforward for drive motor during closed loop control.</div>
</div>
<div class="col-first odd-row-color"><code>double</code></div>
<div class="col-second odd-row-color"><code><a href="#lastAngle" class="member-name-link">lastAngle</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Last angle set for the swerve module.</div>
</div>
<div class="col-first even-row-color"><code>double</code></div>
<div class="col-second even-row-color"><code><a href="#lastTime" class="member-name-link">lastTime</a></code></div>
<div class="col-second even-row-color"><code><a href="#lastAngle" class="member-name-link">lastAngle</a></code></div>
<div class="col-last even-row-color">
<div class="block">Current state.</div>
<div class="block">Last angle set for the swerve module.</div>
</div>
<div class="col-first odd-row-color"><code>int</code></div>
<div class="col-second odd-row-color"><code><a href="#moduleNumber" class="member-name-link">moduleNumber</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Module number for kinematics, usually 0 to 3.</div>
</div>
<div class="col-first even-row-color"><code>double</code></div>
<div class="col-second even-row-color"><code><a href="#omega" class="member-name-link">omega</a></code></div>
<div class="col-first even-row-color"><code>private <a href="simulation/SwerveModuleSimulation.html" title="class in swervelib.simulation">SwerveModuleSimulation</a></code></div>
<div class="col-second even-row-color"><code><a href="#simModule" class="member-name-link">simModule</a></code></div>
<div class="col-last even-row-color">
<div class="block">Current state.</div>
</div>
<div class="col-first odd-row-color"><code>double</code></div>
<div class="col-second odd-row-color"><code><a href="#speed" class="member-name-link">speed</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Current state.</div>
</div>
<div class="col-first even-row-color"><code>private edu.wpi.first.wpilibj.Timer</code></div>
<div class="col-second even-row-color"><code><a href="#time" class="member-name-link">time</a></code></div>
<div class="col-last even-row-color">
<div class="block">Timer for simulation.</div>
<div class="block">Simulated swerve module.</div>
</div>
</div>
</section>
@@ -311,52 +281,10 @@ loadScripts(document, 'script');</script>
</section>
</li>
<li>
<section class="detail" id="angle">
<h3>angle</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">angle</span></div>
<div class="block">Current state.</div>
</section>
</li>
<li>
<section class="detail" id="omega">
<h3>omega</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">omega</span></div>
<div class="block">Current state.</div>
</section>
</li>
<li>
<section class="detail" id="speed">
<h3>speed</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">speed</span></div>
<div class="block">Current state.</div>
</section>
</li>
<li>
<section class="detail" id="fakePos">
<h3>fakePos</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">fakePos</span></div>
<div class="block">Current state.</div>
</section>
</li>
<li>
<section class="detail" id="lastTime">
<h3>lastTime</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">lastTime</span></div>
<div class="block">Current state.</div>
</section>
</li>
<li>
<section class="detail" id="dt">
<h3>dt</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">dt</span></div>
<div class="block">Current state.</div>
</section>
</li>
<li>
<section class="detail" id="time">
<h3>time</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">edu.wpi.first.wpilibj.Timer</span>&nbsp;<span class="element-name">time</span></div>
<div class="block">Timer for simulation.</div>
<section class="detail" id="simModule">
<h3>simModule</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="simulation/SwerveModuleSimulation.html" title="class in swervelib.simulation">SwerveModuleSimulation</a></span>&nbsp;<span class="element-name">simModule</span></div>
<div class="block">Simulated swerve module.</div>
</section>
</li>
</ul>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>CANCoderSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SparkMaxEncoderSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveAbsoluteEncoder</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.encoders</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -78,6 +78,8 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><a href="../parser/package-summary.html">swervelib.parser</a></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><a href="../simulation/package-summary.html">swervelib.simulation</a></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</div>
</li>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.encoders Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -0,0 +1,285 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>ADIS16448Swerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2023-02-15">
<meta name="description" content="declaration: package: swervelib.imu, class: ADIS16448Swerve">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">swervelib.imu</a></div>
<h1 title="Class ADIS16448Swerve" class="title">Class ADIS16448Swerve</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance"><a href="SwerveIMU.html" title="class in swervelib.imu">swervelib.imu.SwerveIMU</a>
<div class="inheritance">swervelib.imu.ADIS16448Swerve</div>
</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">ADIS16448Swerve</span>
<span class="extends-implements">extends <a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></span></div>
<div class="block">IMU Swerve class for the <code>ADIS16448_IMU</code> device.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private final edu.wpi.first.wpilibj.ADIS16448_IMU</code></div>
<div class="col-second even-row-color"><code><a href="#imu" class="member-name-link">imu</a></code></div>
<div class="col-last even-row-color">
<div class="block"><code>ADIS16448_IMU</code> device to read the current headings from.</div>
</div>
<div class="col-first odd-row-color"><code>private double</code></div>
<div class="col-second odd-row-color"><code><a href="#yawOffset" class="member-name-link">yawOffset</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Offset for the ADIS16448 yaw reading.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ADIS16448Swerve</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Construct the ADIS16448 imu and reset default configurations.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clearStickyFaults()" class="member-name-link">clearStickyFaults</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Clear sticky faults on IMU.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#factoryDefault()" class="member-name-link">factoryDefault</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Reset IMU to factory default.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getIMU()" class="member-name-link">getIMU</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the instantiated IMU object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getYawPitchRoll(double%5B%5D)" class="member-name-link">getYawPitchRoll</a><wbr>(double[]&nbsp;yprArray)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Fetch the yaw/pitch/roll from the IMU.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setYaw(double)" class="member-name-link">setYaw</a><wbr>(double&nbsp;yaw)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set the yaw in degrees.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="imu">
<h3>imu</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type">edu.wpi.first.wpilibj.ADIS16448_IMU</span>&nbsp;<span class="element-name">imu</span></div>
<div class="block"><code>ADIS16448_IMU</code> device to read the current headings from.</div>
</section>
</li>
<li>
<section class="detail" id="yawOffset">
<h3>yawOffset</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">yawOffset</span></div>
<div class="block">Offset for the ADIS16448 yaw reading.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>ADIS16448Swerve</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ADIS16448Swerve</span>()</div>
<div class="block">Construct the ADIS16448 imu and reset default configurations. Publish the gyro to the SmartDashboard.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="factoryDefault()">
<h3>factoryDefault</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">factoryDefault</span>()</div>
<div class="block">Reset IMU to factory default.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#factoryDefault()">factoryDefault</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearStickyFaults()">
<h3>clearStickyFaults</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">clearStickyFaults</span>()</div>
<div class="block">Clear sticky faults on IMU.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#clearStickyFaults()">clearStickyFaults</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setYaw(double)">
<h3>setYaw</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setYaw</span><wbr><span class="parameters">(double&nbsp;yaw)</span></div>
<div class="block">Set the yaw in degrees.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#setYaw(double)">setYaw</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Parameters:</dt>
<dd><code>yaw</code> - Yaw angle in degrees.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getYawPitchRoll(double[])">
<h3>getYawPitchRoll</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">getYawPitchRoll</span><wbr><span class="parameters">(double[]&nbsp;yprArray)</span></div>
<div class="block">Fetch the yaw/pitch/roll from the IMU.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#getYawPitchRoll(double%5B%5D)">getYawPitchRoll</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Parameters:</dt>
<dd><code>yprArray</code> - Array which will be filled with {yaw, pitch, roll} in degrees.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getIMU()">
<h3>getIMU</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span>&nbsp;<span class="element-name">getIMU</span>()</div>
<div class="block">Get the instantiated IMU object.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#getIMU()">getIMU</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Returns:</dt>
<dd>IMU object.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,285 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>ADIS16470Swerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2023-02-15">
<meta name="description" content="declaration: package: swervelib.imu, class: ADIS16470Swerve">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">swervelib.imu</a></div>
<h1 title="Class ADIS16470Swerve" class="title">Class ADIS16470Swerve</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance"><a href="SwerveIMU.html" title="class in swervelib.imu">swervelib.imu.SwerveIMU</a>
<div class="inheritance">swervelib.imu.ADIS16470Swerve</div>
</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">ADIS16470Swerve</span>
<span class="extends-implements">extends <a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></span></div>
<div class="block">IMU Swerve class for the <code>ADIS16470_IMU</code> device.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private final edu.wpi.first.wpilibj.ADIS16470_IMU</code></div>
<div class="col-second even-row-color"><code><a href="#imu" class="member-name-link">imu</a></code></div>
<div class="col-last even-row-color">
<div class="block"><code>ADIS16470_IMU</code> device to read the current headings from.</div>
</div>
<div class="col-first odd-row-color"><code>private double</code></div>
<div class="col-second odd-row-color"><code><a href="#yawOffset" class="member-name-link">yawOffset</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Offset for the ADIS16470 yaw reading.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ADIS16470Swerve</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Construct the ADIS16470 imu and reset default configurations.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clearStickyFaults()" class="member-name-link">clearStickyFaults</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Clear sticky faults on IMU.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#factoryDefault()" class="member-name-link">factoryDefault</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Reset IMU to factory default.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getIMU()" class="member-name-link">getIMU</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the instantiated IMU object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getYawPitchRoll(double%5B%5D)" class="member-name-link">getYawPitchRoll</a><wbr>(double[]&nbsp;yprArray)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Fetch the yaw/pitch/roll from the IMU.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setYaw(double)" class="member-name-link">setYaw</a><wbr>(double&nbsp;yaw)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set the yaw in degrees.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="imu">
<h3>imu</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type">edu.wpi.first.wpilibj.ADIS16470_IMU</span>&nbsp;<span class="element-name">imu</span></div>
<div class="block"><code>ADIS16470_IMU</code> device to read the current headings from.</div>
</section>
</li>
<li>
<section class="detail" id="yawOffset">
<h3>yawOffset</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">yawOffset</span></div>
<div class="block">Offset for the ADIS16470 yaw reading.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>ADIS16470Swerve</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ADIS16470Swerve</span>()</div>
<div class="block">Construct the ADIS16470 imu and reset default configurations. Publish the gyro to the SmartDashboard.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="factoryDefault()">
<h3>factoryDefault</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">factoryDefault</span>()</div>
<div class="block">Reset IMU to factory default.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#factoryDefault()">factoryDefault</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearStickyFaults()">
<h3>clearStickyFaults</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">clearStickyFaults</span>()</div>
<div class="block">Clear sticky faults on IMU.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#clearStickyFaults()">clearStickyFaults</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setYaw(double)">
<h3>setYaw</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setYaw</span><wbr><span class="parameters">(double&nbsp;yaw)</span></div>
<div class="block">Set the yaw in degrees.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#setYaw(double)">setYaw</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Parameters:</dt>
<dd><code>yaw</code> - Yaw angle in degrees.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getYawPitchRoll(double[])">
<h3>getYawPitchRoll</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">getYawPitchRoll</span><wbr><span class="parameters">(double[]&nbsp;yprArray)</span></div>
<div class="block">Fetch the yaw/pitch/roll from the IMU.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#getYawPitchRoll(double%5B%5D)">getYawPitchRoll</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Parameters:</dt>
<dd><code>yprArray</code> - Array which will be filled with {yaw, pitch, roll} in degrees.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getIMU()">
<h3>getIMU</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span>&nbsp;<span class="element-name">getIMU</span>()</div>
<div class="block">Get the instantiated IMU object.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#getIMU()">getIMU</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Returns:</dt>
<dd>IMU object.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,285 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>ADXRS450Swerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2023-02-15">
<meta name="description" content="declaration: package: swervelib.imu, class: ADXRS450Swerve">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">swervelib.imu</a></div>
<h1 title="Class ADXRS450Swerve" class="title">Class ADXRS450Swerve</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance"><a href="SwerveIMU.html" title="class in swervelib.imu">swervelib.imu.SwerveIMU</a>
<div class="inheritance">swervelib.imu.ADXRS450Swerve</div>
</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">ADXRS450Swerve</span>
<span class="extends-implements">extends <a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></span></div>
<div class="block">IMU Swerve class for the <code>ADXRS450_Gyro</code> device.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private final edu.wpi.first.wpilibj.ADXRS450_Gyro</code></div>
<div class="col-second even-row-color"><code><a href="#imu" class="member-name-link">imu</a></code></div>
<div class="col-last even-row-color">
<div class="block"><code>ADXRS450_Gyro</code> device to read the current headings from.</div>
</div>
<div class="col-first odd-row-color"><code>private double</code></div>
<div class="col-second odd-row-color"><code><a href="#yawOffset" class="member-name-link">yawOffset</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Offset for the ADXRS450 yaw reading.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ADXRS450Swerve</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Construct the ADXRS450 imu and reset default configurations.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clearStickyFaults()" class="member-name-link">clearStickyFaults</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Clear sticky faults on IMU.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#factoryDefault()" class="member-name-link">factoryDefault</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Reset IMU to factory default.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getIMU()" class="member-name-link">getIMU</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the instantiated IMU object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getYawPitchRoll(double%5B%5D)" class="member-name-link">getYawPitchRoll</a><wbr>(double[]&nbsp;yprArray)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Fetch the yaw/pitch/roll from the IMU.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setYaw(double)" class="member-name-link">setYaw</a><wbr>(double&nbsp;yaw)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set the yaw in degrees.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="imu">
<h3>imu</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type">edu.wpi.first.wpilibj.ADXRS450_Gyro</span>&nbsp;<span class="element-name">imu</span></div>
<div class="block"><code>ADXRS450_Gyro</code> device to read the current headings from.</div>
</section>
</li>
<li>
<section class="detail" id="yawOffset">
<h3>yawOffset</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">yawOffset</span></div>
<div class="block">Offset for the ADXRS450 yaw reading.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>ADXRS450Swerve</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ADXRS450Swerve</span>()</div>
<div class="block">Construct the ADXRS450 imu and reset default configurations. Publish the gyro to the SmartDashboard.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="factoryDefault()">
<h3>factoryDefault</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">factoryDefault</span>()</div>
<div class="block">Reset IMU to factory default.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#factoryDefault()">factoryDefault</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearStickyFaults()">
<h3>clearStickyFaults</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">clearStickyFaults</span>()</div>
<div class="block">Clear sticky faults on IMU.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#clearStickyFaults()">clearStickyFaults</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setYaw(double)">
<h3>setYaw</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setYaw</span><wbr><span class="parameters">(double&nbsp;yaw)</span></div>
<div class="block">Set the yaw in degrees.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#setYaw(double)">setYaw</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Parameters:</dt>
<dd><code>yaw</code> - Yaw angle in degrees.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getYawPitchRoll(double[])">
<h3>getYawPitchRoll</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">getYawPitchRoll</span><wbr><span class="parameters">(double[]&nbsp;yprArray)</span></div>
<div class="block">Fetch the yaw/pitch/roll from the IMU.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#getYawPitchRoll(double%5B%5D)">getYawPitchRoll</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Parameters:</dt>
<dd><code>yprArray</code> - Array which will be filled with {yaw, pitch, roll} in degrees.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getIMU()">
<h3>getIMU</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span>&nbsp;<span class="element-name">getIMU</span>()</div>
<div class="block">Get the instantiated IMU object.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#getIMU()">getIMU</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Returns:</dt>
<dd>IMU object.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,289 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>AnalogGyroSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2023-02-15">
<meta name="description" content="declaration: package: swervelib.imu, class: AnalogGyroSwerve">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">swervelib.imu</a></div>
<h1 title="Class AnalogGyroSwerve" class="title">Class AnalogGyroSwerve</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance"><a href="SwerveIMU.html" title="class in swervelib.imu">swervelib.imu.SwerveIMU</a>
<div class="inheritance">swervelib.imu.AnalogGyroSwerve</div>
</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">AnalogGyroSwerve</span>
<span class="extends-implements">extends <a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></span></div>
<div class="block">Creates a IMU for <code>AnalogGyro</code> devices, only uses yaw.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private final edu.wpi.first.wpilibj.AnalogGyro</code></div>
<div class="col-second even-row-color"><code><a href="#gyro" class="member-name-link">gyro</a></code></div>
<div class="col-last even-row-color">
<div class="block">Gyroscope object.</div>
</div>
<div class="col-first odd-row-color"><code>private double</code></div>
<div class="col-second odd-row-color"><code><a href="#yawOffset" class="member-name-link">yawOffset</a></code></div>
<div class="col-last odd-row-color">
<div class="block">The yaw offset for the gyroscope.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(int)" class="member-name-link">AnalogGyroSwerve</a><wbr>(int&nbsp;channel)</code></div>
<div class="col-last even-row-color">
<div class="block">Analog port in which the gyroscope is connected.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clearStickyFaults()" class="member-name-link">clearStickyFaults</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Clear sticky faults on IMU.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#factoryDefault()" class="member-name-link">factoryDefault</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Reset IMU to factory default.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getIMU()" class="member-name-link">getIMU</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the instantiated IMU object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getYawPitchRoll(double%5B%5D)" class="member-name-link">getYawPitchRoll</a><wbr>(double[]&nbsp;yprArray)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Fetch the yaw/pitch/roll from the IMU.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setYaw(double)" class="member-name-link">setYaw</a><wbr>(double&nbsp;yaw)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set the yaw in degrees.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="gyro">
<h3>gyro</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type">edu.wpi.first.wpilibj.AnalogGyro</span>&nbsp;<span class="element-name">gyro</span></div>
<div class="block">Gyroscope object.</div>
</section>
</li>
<li>
<section class="detail" id="yawOffset">
<h3>yawOffset</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">yawOffset</span></div>
<div class="block">The yaw offset for the gyroscope.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(int)">
<h3>AnalogGyroSwerve</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">AnalogGyroSwerve</span><wbr><span class="parameters">(int&nbsp;channel)</span></div>
<div class="block">Analog port in which the gyroscope is connected. Can only be attached to analog ports 0 or 1.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>channel</code> - Analog port 0 or 1.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="factoryDefault()">
<h3>factoryDefault</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">factoryDefault</span>()</div>
<div class="block">Reset IMU to factory default.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#factoryDefault()">factoryDefault</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearStickyFaults()">
<h3>clearStickyFaults</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">clearStickyFaults</span>()</div>
<div class="block">Clear sticky faults on IMU.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#clearStickyFaults()">clearStickyFaults</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setYaw(double)">
<h3>setYaw</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setYaw</span><wbr><span class="parameters">(double&nbsp;yaw)</span></div>
<div class="block">Set the yaw in degrees.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#setYaw(double)">setYaw</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Parameters:</dt>
<dd><code>yaw</code> - Yaw angle in degrees.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getYawPitchRoll(double[])">
<h3>getYawPitchRoll</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">getYawPitchRoll</span><wbr><span class="parameters">(double[]&nbsp;yprArray)</span></div>
<div class="block">Fetch the yaw/pitch/roll from the IMU.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#getYawPitchRoll(double%5B%5D)">getYawPitchRoll</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Parameters:</dt>
<dd><code>yprArray</code> - Array which will be filled with {yaw, pitch, roll} in degrees.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getIMU()">
<h3>getIMU</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span>&nbsp;<span class="element-name">getIMU</span>()</div>
<div class="block">Get the instantiated IMU object.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="SwerveIMU.html#getIMU()">getIMU</a></code>&nbsp;in class&nbsp;<code><a href="SwerveIMU.html" title="class in swervelib.imu">SwerveIMU</a></code></dd>
<dt>Returns:</dt>
<dd>IMU object.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>NavXSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>Pigeon2Swerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>PigeonSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveIMU</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -77,7 +77,7 @@ loadScripts(document, 'script');</script>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="NavXSwerve.html" title="class in swervelib.imu">NavXSwerve</a></code>, <code><a href="Pigeon2Swerve.html" title="class in swervelib.imu">Pigeon2Swerve</a></code>, <code><a href="PigeonSwerve.html" title="class in swervelib.imu">PigeonSwerve</a></code></dd>
<dd><code><a href="ADIS16448Swerve.html" title="class in swervelib.imu">ADIS16448Swerve</a></code>, <code><a href="ADIS16470Swerve.html" title="class in swervelib.imu">ADIS16470Swerve</a></code>, <code><a href="ADXRS450Swerve.html" title="class in swervelib.imu">ADXRS450Swerve</a></code>, <code><a href="AnalogGyroSwerve.html" title="class in swervelib.imu">AnalogGyroSwerve</a></code>, <code><a href="NavXSwerve.html" title="class in swervelib.imu">NavXSwerve</a></code>, <code><a href="Pigeon2Swerve.html" title="class in swervelib.imu">Pigeon2Swerve</a></code>, <code><a href="PigeonSwerve.html" title="class in swervelib.imu">PigeonSwerve</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">SwerveIMU</span>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.imu</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -78,6 +78,8 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><a href="../parser/package-summary.html">swervelib.parser</a></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><a href="../simulation/package-summary.html">swervelib.simulation</a></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</div>
</li>
@@ -87,6 +89,22 @@ loadScripts(document, 'script');</script>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="ADIS16448Swerve.html" title="class in swervelib.imu">ADIS16448Swerve</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">IMU Swerve class for the <code>ADIS16448_IMU</code> device.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="ADIS16470Swerve.html" title="class in swervelib.imu">ADIS16470Swerve</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">IMU Swerve class for the <code>ADIS16470_IMU</code> device.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="ADXRS450Swerve.html" title="class in swervelib.imu">ADXRS450Swerve</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">IMU Swerve class for the <code>ADXRS450_Gyro</code> device.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="AnalogGyroSwerve.html" title="class in swervelib.imu">AnalogGyroSwerve</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Creates a IMU for <code>AnalogGyro</code> devices, only uses yaw.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="NavXSwerve.html" title="class in swervelib.imu">NavXSwerve</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">Communicates with the NavX as the IMU.</div>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.imu Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -61,6 +61,10 @@ loadScripts(document, 'script');</script>
<ul>
<li class="circle">swervelib.imu.<a href="SwerveIMU.html" class="type-name-link" title="class in swervelib.imu">SwerveIMU</a>
<ul>
<li class="circle">swervelib.imu.<a href="ADIS16448Swerve.html" class="type-name-link" title="class in swervelib.imu">ADIS16448Swerve</a></li>
<li class="circle">swervelib.imu.<a href="ADIS16470Swerve.html" class="type-name-link" title="class in swervelib.imu">ADIS16470Swerve</a></li>
<li class="circle">swervelib.imu.<a href="ADXRS450Swerve.html" class="type-name-link" title="class in swervelib.imu">ADXRS450Swerve</a></li>
<li class="circle">swervelib.imu.<a href="AnalogGyroSwerve.html" class="type-name-link" title="class in swervelib.imu">AnalogGyroSwerve</a></li>
<li class="circle">swervelib.imu.<a href="NavXSwerve.html" class="type-name-link" title="class in swervelib.imu">NavXSwerve</a></li>
<li class="circle">swervelib.imu.<a href="Pigeon2Swerve.html" class="type-name-link" title="class in swervelib.imu">Pigeon2Swerve</a></li>
<li class="circle">swervelib.imu.<a href="PigeonSwerve.html" class="type-name-link" title="class in swervelib.imu">PigeonSwerve</a></li>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveKinematics2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveMath</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -336,7 +336,7 @@ loadScripts(document, 'script');</script>
edu.wpi.first.math.geometry.Translation3d&nbsp;chassisCenterOfGravity,
<a href="../parser/SwerveDriveConfiguration.html" title="class in swervelib.parser">SwerveDriveConfiguration</a>&nbsp;config)</span></div>
<div class="block">Calculates the maximum acceleration allowed in a direction without tipping the robot. Reads arm position from
NetworkTables and is passed the direction in question.</div>
NetworkTables and is passed the direction in question.<br/><b>Requires modules to be named: <br/>"frontright.json", "frontleft.json", "backright.json", "backleft.json"</b></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>angle</code> - The direction in which to calculate max acceleration, as a Rotation2d. Note that this
@@ -363,7 +363,8 @@ loadScripts(document, 'script');</script>
<a href="../parser/SwerveDriveConfiguration.html" title="class in swervelib.parser">SwerveDriveConfiguration</a>&nbsp;config)</span></div>
<div class="block">Limits a commanded velocity to prevent exceeding the maximum acceleration given by
<a href="#calcMaxAccel(edu.wpi.first.math.geometry.Rotation2d,double,double,edu.wpi.first.math.geometry.Translation3d,swervelib.parser.SwerveDriveConfiguration)"><code>calcMaxAccel(Rotation2d, double, double, Translation3d, SwerveDriveConfiguration)</code></a>. Note that
this takes and returns field-relative velocities.</div>
this takes and returns field-relative velocities. <br/><b>Requires modules to be named:<br/> "frontright.json",
"frontleft.json", "backright.json", "backleft.json"</b></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>commandedVelocity</code> - The desired velocity</dd>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveModuleState2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.math</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -78,6 +78,8 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><a href="../parser/package-summary.html">swervelib.parser</a></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><a href="../simulation/package-summary.html">swervelib.simulation</a></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</div>
</li>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.math Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SparkMaxSwerve.SparkMAX_slotIdx</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SparkMaxSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveMotor</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>TalonFXSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>TalonSRXSwerve.CTRE_pidIdx</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>TalonSRXSwerve.CTRE_remoteSensor</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>TalonSRXSwerve.CTRE_slotIdx</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>TalonSRXSwerve</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.motors</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -82,6 +82,8 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><a href="../parser/package-summary.html">swervelib.parser</a></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><a href="../simulation/package-summary.html">swervelib.simulation</a></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</div>
</li>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.motors Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -78,6 +78,8 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><a href="parser/package-summary.html">swervelib.parser</a></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><a href="simulation/package-summary.html">swervelib.simulation</a></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</div>
</li>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>PIDFConfig</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveControllerConfiguration</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveDriveConfiguration</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveModuleConfiguration</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveModulePhysicalCharacteristics</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveParser</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>PIDFRange</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.parser.deserializer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.parser.deserializer Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>ControllerPropertiesJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>DeviceJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>ModuleJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>MotorConfigDouble</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>MotorConfigInt</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>PIDFPropertiesJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>PhysicalPropertiesJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveDriveJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>BoolMotorJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>LocationJson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.parser.json.modules</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.parser.json.modules Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.parser.json</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.parser.json Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.parser</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -82,6 +82,8 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><a href="../motors/package-summary.html">swervelib.motors</a></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><a href="../simulation/package-summary.html">swervelib.simulation</a></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</div>
</li>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 00:08:08 CST 2023 -->
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.parser Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -0,0 +1,316 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveIMUSimulation</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2023-02-15">
<meta name="description" content="declaration: package: swervelib.simulation, class: SwerveIMUSimulation">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">swervelib.simulation</a></div>
<h1 title="Class SwerveIMUSimulation" class="title">Class SwerveIMUSimulation</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">swervelib.simulation.SwerveIMUSimulation</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">SwerveIMUSimulation</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">Simulation for <a href="../SwerveDrive.html" title="class in swervelib"><code>SwerveDrive</code></a> IMU.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private double</code></div>
<div class="col-second even-row-color"><code><a href="#angle" class="member-name-link">angle</a></code></div>
<div class="col-last even-row-color">
<div class="block">Heading of the robot.</div>
</div>
<div class="col-first odd-row-color"><code>private double</code></div>
<div class="col-second odd-row-color"><code><a href="#lastTime" class="member-name-link">lastTime</a></code></div>
<div class="col-last odd-row-color">
<div class="block">The last time the timer was read, used to determine position changes.</div>
</div>
<div class="col-first even-row-color"><code>private final edu.wpi.first.wpilibj.Timer</code></div>
<div class="col-second even-row-color"><code><a href="#timer" class="member-name-link">timer</a></code></div>
<div class="col-last even-row-color">
<div class="block">Main timer to control movement estimations.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">SwerveIMUSimulation</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Create the swerve drive IMU simulation.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation3d</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getGyroRotation3d()" class="member-name-link">getGyroRotation3d</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the estimated gyro <code>Rotation3d</code> of the robot.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation2d</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPitch()" class="member-name-link">getPitch</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Pitch is not simulated currently, always returns 0.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation2d</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRoll()" class="member-name-link">getRoll</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Roll is not simulated currently, always returns 0.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.geometry.Rotation2d</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getYaw()" class="member-name-link">getYaw</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the estimated angle of the robot.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setAngle(double)" class="member-name-link">setAngle</a><wbr>(double&nbsp;angle)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set the heading of the robot.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#updateOdometry(swervelib.math.SwerveKinematics2,swervelib.math.SwerveModuleState2%5B%5D,edu.wpi.first.math.geometry.Pose2d%5B%5D,edu.wpi.first.wpilibj.smartdashboard.Field2d)" class="member-name-link">updateOdometry</a><wbr>(<a href="../math/SwerveKinematics2.html" title="class in swervelib.math">SwerveKinematics2</a>&nbsp;kinematics,
<a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]&nbsp;states,
edu.wpi.first.math.geometry.Pose2d[]&nbsp;modulePoses,
edu.wpi.first.wpilibj.smartdashboard.Field2d&nbsp;field)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Update the odometry of the simulated <a href="../SwerveDrive.html" title="class in swervelib"><code>SwerveDrive</code></a> and post the <a href="../SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a>
states to the <code>Field2d</code>.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="timer">
<h3>timer</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type">edu.wpi.first.wpilibj.Timer</span>&nbsp;<span class="element-name">timer</span></div>
<div class="block">Main timer to control movement estimations.</div>
</section>
</li>
<li>
<section class="detail" id="lastTime">
<h3>lastTime</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">lastTime</span></div>
<div class="block">The last time the timer was read, used to determine position changes.</div>
</section>
</li>
<li>
<section class="detail" id="angle">
<h3>angle</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">angle</span></div>
<div class="block">Heading of the robot.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>SwerveIMUSimulation</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">SwerveIMUSimulation</span>()</div>
<div class="block">Create the swerve drive IMU simulation.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getYaw()">
<h3>getYaw</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">edu.wpi.first.math.geometry.Rotation2d</span>&nbsp;<span class="element-name">getYaw</span>()</div>
<div class="block">Get the estimated angle of the robot.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>Rotation2d</code> estimation of the robot.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getPitch()">
<h3>getPitch</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">edu.wpi.first.math.geometry.Rotation2d</span>&nbsp;<span class="element-name">getPitch</span>()</div>
<div class="block">Pitch is not simulated currently, always returns 0.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Pitch of the robot as <code>Rotation2d</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRoll()">
<h3>getRoll</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">edu.wpi.first.math.geometry.Rotation2d</span>&nbsp;<span class="element-name">getRoll</span>()</div>
<div class="block">Roll is not simulated currently, always returns 0.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Roll of the robot as <code>Rotation2d</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getGyroRotation3d()">
<h3>getGyroRotation3d</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">edu.wpi.first.math.geometry.Rotation3d</span>&nbsp;<span class="element-name">getGyroRotation3d</span>()</div>
<div class="block">Gets the estimated gyro <code>Rotation3d</code> of the robot.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The heading as a <code>Rotation3d</code> angle</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="updateOdometry(swervelib.math.SwerveKinematics2,swervelib.math.SwerveModuleState2[],edu.wpi.first.math.geometry.Pose2d[],edu.wpi.first.wpilibj.smartdashboard.Field2d)">
<h3>updateOdometry</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">updateOdometry</span><wbr><span class="parameters">(<a href="../math/SwerveKinematics2.html" title="class in swervelib.math">SwerveKinematics2</a>&nbsp;kinematics,
<a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>[]&nbsp;states,
edu.wpi.first.math.geometry.Pose2d[]&nbsp;modulePoses,
edu.wpi.first.wpilibj.smartdashboard.Field2d&nbsp;field)</span></div>
<div class="block">Update the odometry of the simulated <a href="../SwerveDrive.html" title="class in swervelib"><code>SwerveDrive</code></a> and post the <a href="../SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a>
states to the <code>Field2d</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>kinematics</code> - <a href="../math/SwerveKinematics2.html" title="class in swervelib.math"><code>SwerveKinematics2</code></a> of the swerve drive.</dd>
<dd><code>states</code> - <a href="../math/SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> array of the module states.</dd>
<dd><code>modulePoses</code> - <code>Pose2d</code> representing the swerve modules.</dd>
<dd><code>field</code> - <code>Field2d</code> to update.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setAngle(double)">
<h3>setAngle</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setAngle</span><wbr><span class="parameters">(double&nbsp;angle)</span></div>
<div class="block">Set the heading of the robot.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>angle</code> - Angle of the robot in radians.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,294 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>SwerveModuleSimulation</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2023-02-15">
<meta name="description" content="declaration: package: swervelib.simulation, class: SwerveModuleSimulation">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">swervelib.simulation</a></div>
<h1 title="Class SwerveModuleSimulation" class="title">Class SwerveModuleSimulation</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">swervelib.simulation.SwerveModuleSimulation</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">SwerveModuleSimulation</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">Class to hold simulation data for <a href="../SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a></div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private double</code></div>
<div class="col-second even-row-color"><code><a href="#dt" class="member-name-link">dt</a></code></div>
<div class="col-last even-row-color">
<div class="block">Time delta since last update</div>
</div>
<div class="col-first odd-row-color"><code>private double</code></div>
<div class="col-second odd-row-color"><code><a href="#fakePos" class="member-name-link">fakePos</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Fake motor position.</div>
</div>
<div class="col-first even-row-color"><code>private double</code></div>
<div class="col-second even-row-color"><code><a href="#fakeSpeed" class="member-name-link">fakeSpeed</a></code></div>
<div class="col-last even-row-color">
<div class="block">The fake speed of the previous state, used to calculate <a href="#fakePos"><code>fakePos</code></a>.</div>
</div>
<div class="col-first odd-row-color"><code>private double</code></div>
<div class="col-second odd-row-color"><code><a href="#lastTime" class="member-name-link">lastTime</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Last time queried.</div>
</div>
<div class="col-first even-row-color"><code>private <a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a></code></div>
<div class="col-second even-row-color"><code><a href="#state" class="member-name-link">state</a></code></div>
<div class="col-last even-row-color">
<div class="block">Current simulated swerve module state.</div>
</div>
<div class="col-first odd-row-color"><code>private final edu.wpi.first.wpilibj.Timer</code></div>
<div class="col-second odd-row-color"><code><a href="#timer" class="member-name-link">timer</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Main timer to simulate the passage of time.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">SwerveModuleSimulation</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Create simulation class and initialize module at 0.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>edu.wpi.first.math.kinematics.SwerveModulePosition</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPosition()" class="member-name-link">getPosition</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the simulated swerve module position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getState()" class="member-name-link">getState</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the <a href="../math/SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> of the simulated module.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#updateStateAndPosition(swervelib.math.SwerveModuleState2)" class="member-name-link">updateStateAndPosition</a><wbr>(<a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>&nbsp;desiredState)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Update the position and state of the module.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="timer">
<h3>timer</h3>
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type">edu.wpi.first.wpilibj.Timer</span>&nbsp;<span class="element-name">timer</span></div>
<div class="block">Main timer to simulate the passage of time.</div>
</section>
</li>
<li>
<section class="detail" id="dt">
<h3>dt</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">dt</span></div>
<div class="block">Time delta since last update</div>
</section>
</li>
<li>
<section class="detail" id="fakePos">
<h3>fakePos</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">fakePos</span></div>
<div class="block">Fake motor position.</div>
</section>
</li>
<li>
<section class="detail" id="fakeSpeed">
<h3>fakeSpeed</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">fakeSpeed</span></div>
<div class="block">The fake speed of the previous state, used to calculate <a href="#fakePos"><code>fakePos</code></a>.</div>
</section>
</li>
<li>
<section class="detail" id="lastTime">
<h3>lastTime</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">lastTime</span></div>
<div class="block">Last time queried.</div>
</section>
</li>
<li>
<section class="detail" id="state">
<h3>state</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a></span>&nbsp;<span class="element-name">state</span></div>
<div class="block">Current simulated swerve module state.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>SwerveModuleSimulation</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">SwerveModuleSimulation</span>()</div>
<div class="block">Create simulation class and initialize module at 0.</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="updateStateAndPosition(swervelib.math.SwerveModuleState2)">
<h3>updateStateAndPosition</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">updateStateAndPosition</span><wbr><span class="parameters">(<a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>&nbsp;desiredState)</span></div>
<div class="block">Update the position and state of the module. Called from <a href="../SwerveModule.html#setDesiredState(swervelib.math.SwerveModuleState2,boolean)"><code>SwerveModule.setDesiredState(swervelib.math.SwerveModuleState2, boolean)</code></a> function
when simulated.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>desiredState</code> - State the swerve module is set to.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getPosition()">
<h3>getPosition</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">edu.wpi.first.math.kinematics.SwerveModulePosition</span>&nbsp;<span class="element-name">getPosition</span>()</div>
<div class="block">Get the simulated swerve module position.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>SwerveModulePosition</code> of the simulated module.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getState()">
<h3>getState</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a></span>&nbsp;<span class="element-name">getState</span>()</div>
<div class="block">Get the <a href="../math/SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> of the simulated module.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><a href="../math/SwerveModuleState2.html" title="class in swervelib.math"><code>SwerveModuleState2</code></a> of the simulated module.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,109 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.simulation</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2023-02-15">
<meta name="description" content="declaration: package: swervelib.simulation">
<meta name="generator" content="javadoc/PackageWriterImpl">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="package-declaration-page">
<script type="text/javascript">var pathtoroot = "../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li class="nav-bar-cell1-rev">Package</li>
<li>Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html#package">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Package:&nbsp;</li>
<li>Description&nbsp;|&nbsp;</li>
<li><a href="#related-package-summary">Related Packages</a>&nbsp;|&nbsp;</li>
<li><a href="#class-summary">Classes and Interfaces</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<div class="header">
<h1 title="Package swervelib.simulation" class="title">Package swervelib.simulation</h1>
</div>
<hr>
<div class="package-signature">package <span class="element-name">swervelib.simulation</span></div>
<section class="summary">
<ul class="summary-list">
<li>
<div id="related-package-summary">
<div class="caption"><span>Related Packages</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Package</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><a href="../package-summary.html">swervelib</a></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><a href="../encoders/package-summary.html">swervelib.encoders</a></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><a href="../imu/package-summary.html">swervelib.imu</a></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><a href="../math/package-summary.html">swervelib.math</a></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><a href="../motors/package-summary.html">swervelib.motors</a></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><a href="../parser/package-summary.html">swervelib.parser</a></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</div>
</li>
<li>
<div id="class-summary">
<div class="caption"><span>Classes</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="SwerveIMUSimulation.html" title="class in swervelib.simulation">SwerveIMUSimulation</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">Simulation for <a href="../SwerveDrive.html" title="class in swervelib"><code>SwerveDrive</code></a> IMU.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="SwerveModuleSimulation.html" title="class in swervelib.simulation">SwerveModuleSimulation</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Class to hold simulation data for <a href="../SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a></div>
</div>
</div>
</div>
</li>
</ul>
</section>
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,72 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Feb 15 22:17:49 CST 2023 -->
<title>swervelib.simulation Class Hierarchy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2023-02-15">
<meta name="description" content="tree: package: swervelib.simulation">
<meta name="generator" content="javadoc/PackageTreeWriter">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="package-tree-page">
<script type="text/javascript">var pathtoroot = "../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="nav-bar-cell1-rev">Tree</li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html#tree">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<div class="header">
<h1 class="title">Hierarchy For Package swervelib.simulation</h1>
<span class="package-hierarchy-label">Package Hierarchies:</span>
<ul class="horizontal">
<li><a href="../../overview-tree.html">All Packages</a></li>
</ul>
</div>
<section class="hierarchy">
<h2 title="Class Hierarchy">Class Hierarchy</h2>
<ul>
<li class="circle">java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" class="type-name-link external-link" title="class or interface in java.lang">Object</a>
<ul>
<li class="circle">swervelib.simulation.<a href="SwerveIMUSimulation.html" class="type-name-link" title="class in swervelib.simulation">SwerveIMUSimulation</a></li>
<li class="circle">swervelib.simulation.<a href="SwerveModuleSimulation.html" class="type-name-link" title="class in swervelib.simulation">SwerveModuleSimulation</a></li>
</ul>
</li>
</ul>
</section>
</main>
</div>
</div>
</body>
</html>