<divclass="inheritance"title="Inheritance Tree"><ahref="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>
<divclass="type-signature"><spanclass="modifiers">public class </span><spanclass="element-name type-name-label">SwerveModule</span>
<spanclass="extends-implements">extends <ahref="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>
<divclass="col-first even-row-color"><code>private final <ahref="encoders/SwerveAbsoluteEncoder.html"title="class in swervelib.encoders">SwerveAbsoluteEncoder</a></code></div>
<divclass="block">Angle offset from the absolute encoder.</div>
</div>
<divclass="col-first odd-row-color"><code>final <ahref="parser/SwerveModuleConfiguration.html"title="class in swervelib.parser">SwerveModuleConfiguration</a></code></div>
<divclass="col-first even-row-color"><code>private final <ahref="motors/SwerveMotor.html"title="class in swervelib.motors">SwerveMotor</a></code></div>
<divclass="block">Enable <ahref="math/SwerveModuleState2.html"title="class in swervelib.math"><code>SwerveModuleState2</code></a> optimizations so the angle is reversed and speed is reversed to ensure the module
never turns more than 90deg.</div>
</div>
<divclass="col-first odd-row-color"><code>private <ahref="simulation/SwerveModuleSimulation.html"title="class in swervelib.simulation">SwerveModuleSimulation</a></code></div>
<divclass="block">Get the angle <ahref="motors/SwerveMotor.html"title="class in swervelib.motors"><code>SwerveMotor</code></a> for the <ahref="SwerveModule.html"title="class in swervelib"><code>SwerveModule</code></a>.</div>
<divclass="block">Fetch the <ahref="parser/SwerveModuleConfiguration.html"title="class in swervelib.parser"><code>SwerveModuleConfiguration</code></a> for the <ahref="SwerveModule.html"title="class in swervelib"><code>SwerveModule</code></a> with the parsed configurations.</div>
<divclass="block">Get the drive <ahref="motors/SwerveMotor.html"title="class in swervelib.motors"><code>SwerveMotor</code></a> for the <ahref="SwerveModule.html"title="class in swervelib"><code>SwerveModule</code></a>.</div>
<h3id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<ahref="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><ahref="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>, <ahref="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>, <ahref="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>, <ahref="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>, <ahref="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>, <ahref="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>, <ahref="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>, <ahref="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>, <ahref="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>, <ahref="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>, <ahref="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>
<divclass="member-signature"><spanclass="modifiers">public final</span> <spanclass="return-type"><ahref="parser/SwerveModuleConfiguration.html"title="class in swervelib.parser">SwerveModuleConfiguration</a></span> <spanclass="element-name">configuration</span></div>
<divclass="block">Angle offset from the absolute encoder.</div>
</section>
</li>
<li>
<sectionclass="detail"id="angleMotor">
<h3>angleMotor</h3>
<divclass="member-signature"><spanclass="modifiers">private final</span> <spanclass="return-type"><ahref="motors/SwerveMotor.html"title="class in swervelib.motors">SwerveMotor</a></span> <spanclass="element-name">angleMotor</span></div>
<divclass="block">Swerve Motors.</div>
</section>
</li>
<li>
<sectionclass="detail"id="driveMotor">
<h3>driveMotor</h3>
<divclass="member-signature"><spanclass="modifiers">private final</span> <spanclass="return-type"><ahref="motors/SwerveMotor.html"title="class in swervelib.motors">SwerveMotor</a></span> <spanclass="element-name">driveMotor</span></div>
<divclass="block">Swerve Motors.</div>
</section>
</li>
<li>
<sectionclass="detail"id="absoluteEncoder">
<h3>absoluteEncoder</h3>
<divclass="member-signature"><spanclass="modifiers">private final</span> <spanclass="return-type"><ahref="encoders/SwerveAbsoluteEncoder.html"title="class in swervelib.encoders">SwerveAbsoluteEncoder</a></span> <spanclass="element-name">absoluteEncoder</span></div>
<divclass="block">Absolute encoder for swerve drive.</div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="math/SwerveModuleState2.html"title="class in swervelib.math">SwerveModuleState2</a></span> <spanclass="element-name">lastState</span></div>
<divclass="block">Last swerve module state applied.</div>
<divclass="block">Enable <ahref="math/SwerveModuleState2.html"title="class in swervelib.math"><code>SwerveModuleState2</code></a> optimizations so the angle is reversed and speed is reversed to ensure the module
never turns more than 90deg.</div>
</section>
</li>
<li>
<sectionclass="detail"id="simModule">
<h3>simModule</h3>
<divclass="member-signature"><spanclass="modifiers">private</span> <spanclass="return-type"><ahref="simulation/SwerveModuleSimulation.html"title="class in swervelib.simulation">SwerveModuleSimulation</a></span> <spanclass="element-name">simModule</span></div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">void</span> <spanclass="element-name">setDesiredState</span><wbr><spanclass="parameters">(<ahref="math/SwerveModuleState2.html"title="class in swervelib.math">SwerveModuleState2</a> desiredState,
<divclass="block">Set the desired state of the swerve module. <br/><b>WARNING: If you are not using one of the functions from
<ahref="SwerveDrive.html"title="class in swervelib"><code>SwerveDrive</code></a> you may screw up <ahref="SwerveDrive.html#kinematics"><code>SwerveDrive.kinematics</code></a></b></div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="math/SwerveModuleState2.html"title="class in swervelib.math">SwerveModuleState2</a></span> <spanclass="element-name">getState</span>()</div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="motors/SwerveMotor.html"title="class in swervelib.motors">SwerveMotor</a></span> <spanclass="element-name">getAngleMotor</span>()</div>
<divclass="block">Get the angle <ahref="motors/SwerveMotor.html"title="class in swervelib.motors"><code>SwerveMotor</code></a> for the <ahref="SwerveModule.html"title="class in swervelib"><code>SwerveModule</code></a>.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd><ahref="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>
<sectionclass="detail"id="getDriveMotor()">
<h3>getDriveMotor</h3>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="motors/SwerveMotor.html"title="class in swervelib.motors">SwerveMotor</a></span> <spanclass="element-name">getDriveMotor</span>()</div>
<divclass="block">Get the drive <ahref="motors/SwerveMotor.html"title="class in swervelib.motors"><code>SwerveMotor</code></a> for the <ahref="SwerveModule.html"title="class in swervelib"><code>SwerveModule</code></a>.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd><ahref="motors/SwerveMotor.html"title="class in swervelib.motors"><code>SwerveMotor</code></a> for the drive motor of the module.</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getConfiguration()">
<h3>getConfiguration</h3>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="parser/SwerveModuleConfiguration.html"title="class in swervelib.parser">SwerveModuleConfiguration</a></span> <spanclass="element-name">getConfiguration</span>()</div>
<divclass="block">Fetch the <ahref="parser/SwerveModuleConfiguration.html"title="class in swervelib.parser"><code>SwerveModuleConfiguration</code></a> for the <ahref="SwerveModule.html"title="class in swervelib"><code>SwerveModule</code></a> with the parsed configurations.</div>
<dd><ahref="parser/SwerveModuleConfiguration.html"title="class in swervelib.parser"><code>SwerveModuleConfiguration</code></a> for the <ahref="SwerveModule.html"title="class in swervelib"><code>SwerveModule</code></a>.</dd>