Added some helper functions and cleared up some optimizations

This commit is contained in:
thenetworkgrinch
2023-03-20 19:20:26 -05:00
parent 9887cf3c26
commit 670154f061
111 changed files with 445 additions and 280 deletions

View File

@@ -1,11 +1,11 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed Mar 15 21:47:27 CDT 2023 -->
<!-- Generated by javadoc (17) on Mon Mar 20 19:20:01 CDT 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">
<meta name="dc.created" content="2023-03-15">
<meta name="dc.created" content="2023-03-20">
<meta name="description" content="declaration: package: swervelib, class: SwerveModule">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
@@ -181,41 +181,56 @@ loadScripts(document, 'script');</script>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the absolute position.</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.kinematics.SwerveModulePosition</code></div>
<div class="col-second odd-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-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="motors/SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getAngleMotor()" class="member-name-link">getAngleMotor</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 angle <a href="motors/SwerveMotor.html" title="class in swervelib.motors"><code>SwerveMotor</code></a> for the <a href="SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getConfiguration()" class="member-name-link">getConfiguration</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Fetch the <a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser"><code>SwerveModuleConfiguration</code></a> for the <a href="SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a> with the parsed configurations.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="motors/SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDriveMotor()" class="member-name-link">getDriveMotor</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 drive <a href="motors/SwerveMotor.html" title="class in swervelib.motors"><code>SwerveMotor</code></a> for the <a href="SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a>.</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="#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 position of the swerve module.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRelativePosition()" class="member-name-link">getRelativePosition</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRelativePosition()" class="member-name-link">getRelativePosition</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 relative angle in degrees.</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="col-first even-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 even-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 even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the Swerve Module state.</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="#queueSynchronizeEncoders()" class="member-name-link">queueSynchronizeEncoders</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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="#queueSynchronizeEncoders()" class="member-name-link">queueSynchronizeEncoders</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Queue synchronization of the integrated angle encoder with the absolute encoder.</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="#setAngle(double)" class="member-name-link">setAngle</a><wbr>(double&nbsp;angle)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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 angle for the 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="#setDesiredState(swervelib.math.SwerveModuleState2,boolean,boolean)" class="member-name-link">setDesiredState</a><wbr>(<a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>&nbsp;desiredState,
<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="#setDesiredState(swervelib.math.SwerveModuleState2,boolean,boolean)" class="member-name-link">setDesiredState</a><wbr>(<a href="math/SwerveModuleState2.html" title="class in swervelib.math">SwerveModuleState2</a>&nbsp;desiredState,
boolean&nbsp;isOpenLoop,
boolean&nbsp;force)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set the desired state of the swerve module.</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="#setMotorBrake(boolean)" class="member-name-link">setMotorBrake</a><wbr>(boolean&nbsp;brake)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<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="#setMotorBrake(boolean)" class="member-name-link">setMotorBrake</a><wbr>(boolean&nbsp;brake)</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 brake mode.</div>
</div>
</div>
@@ -431,6 +446,39 @@ loadScripts(document, 'script');</script>
</dl>
</section>
</li>
<li>
<section class="detail" id="getAngleMotor()">
<h3>getAngleMotor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="motors/SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></span>&nbsp;<span class="element-name">getAngleMotor</span>()</div>
<div class="block">Get the angle <a href="motors/SwerveMotor.html" title="class in swervelib.motors"><code>SwerveMotor</code></a> for the <a href="SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><a href="motors/SwerveMotor.html" title="class in swervelib.motors"><code>SwerveMotor</code></a> for the angle/steering motor of the module.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDriveMotor()">
<h3>getDriveMotor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="motors/SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></span>&nbsp;<span class="element-name">getDriveMotor</span>()</div>
<div class="block">Get the drive <a href="motors/SwerveMotor.html" title="class in swervelib.motors"><code>SwerveMotor</code></a> for the <a href="SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><a href="motors/SwerveMotor.html" title="class in swervelib.motors"><code>SwerveMotor</code></a> for the drive motor of the module.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getConfiguration()">
<h3>getConfiguration</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a></span>&nbsp;<span class="element-name">getConfiguration</span>()</div>
<div class="block">Fetch the <a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser"><code>SwerveModuleConfiguration</code></a> for the <a href="SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a> with the parsed configurations.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser"><code>SwerveModuleConfiguration</code></a> for the <a href="SwerveModule.html" title="class in swervelib"><code>SwerveModule</code></a>.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>