mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Updated javadocs
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Fri Sep 01 00:20:10 CDT 2023 -->
|
||||
<!-- Generated by javadoc (17) on Thu Nov 09 18:54:29 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">
|
||||
<meta name="dc.created" content="2023-09-01">
|
||||
<meta name="dc.created" content="2023-11-09">
|
||||
<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">
|
||||
@@ -126,25 +126,30 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Last swerve module state applied.</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-first odd-row-color"><code>double</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#maxSpeed" class="member-name-link">maxSpeed</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Maximum speed of the drive motors in meters per second.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>int</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#moduleNumber" class="member-name-link">moduleNumber</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Module number for kinematics, usually 0 to 3.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>boolean</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#moduleStateOptimization" class="member-name-link">moduleStateOptimization</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="col-first odd-row-color"><code>boolean</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#moduleStateOptimization" class="member-name-link">moduleStateOptimization</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Enable <code>SwerveModuleState</code> optimizations so the angle is reversed and speed is reversed to ensure the module
|
||||
never turns more than 90deg.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>private <a href="simulation/SwerveModuleSimulation.html" title="class in swervelib.simulation">SwerveModuleSimulation</a></code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#simModule" class="member-name-link">simModule</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<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">Simulated swerve module.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>private boolean</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#synchronizeEncoderQueued" class="member-name-link">synchronizeEncoderQueued</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="col-first odd-row-color"><code>private boolean</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#synchronizeEncoderQueued" class="member-name-link">synchronizeEncoderQueued</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Encoder synchronization queued.</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -158,8 +163,9 @@ loadScripts(document, 'script');</script>
|
||||
<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,swervelib.parser.SwerveModuleConfiguration)" class="member-name-link">SwerveModule</a><wbr>(int moduleNumber,
|
||||
<a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a> moduleConfiguration)</code></div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(int,swervelib.parser.SwerveModuleConfiguration,edu.wpi.first.math.controller.SimpleMotorFeedforward)" class="member-name-link">SwerveModule</a><wbr>(int moduleNumber,
|
||||
<a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a> moduleConfiguration,
|
||||
edu.wpi.first.math.controller.SimpleMotorFeedforward driveFeedforward)</code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Construct the swerve module and initialize the swerve module motors and absolute encoder.</div>
|
||||
</div>
|
||||
@@ -223,6 +229,16 @@ loadScripts(document, 'script');</script>
|
||||
<div class="block">Set the angle for the 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="#setAngleMotorConversionFactor(double)" class="member-name-link">setAngleMotorConversionFactor</a><wbr>(double conversionFactor)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Set the conversion factor for the angle/azimuth motor controller.</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="#setAngleMotorVoltageCompensation(double)" class="member-name-link">setAngleMotorVoltageCompensation</a><wbr>(double optimalVoltage)</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 voltage compensation for the swerve module motor.</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="#setDesiredState(edu.wpi.first.math.kinematics.SwerveModuleState,boolean,boolean)" class="member-name-link">setDesiredState</a><wbr>(edu.wpi.first.math.kinematics.SwerveModuleState desiredState,
|
||||
boolean isOpenLoop,
|
||||
boolean force)</code></div>
|
||||
@@ -230,6 +246,16 @@ loadScripts(document, 'script');</script>
|
||||
<div class="block">Set the desired state 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>void</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setDriveMotorConversionFactor(double)" class="member-name-link">setDriveMotorConversionFactor</a><wbr>(double conversionFactor)</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 conversion factor for the drive motor controller.</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="#setDriveMotorVoltageCompensation(double)" class="member-name-link">setDriveMotorVoltageCompensation</a><wbr>(double optimalVoltage)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Set the voltage compensation for the swerve module motor.</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="#setMotorBrake(boolean)" class="member-name-link">setMotorBrake</a><wbr>(boolean 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>
|
||||
@@ -301,6 +327,13 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="maxSpeed">
|
||||
<h3>maxSpeed</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">maxSpeed</span></div>
|
||||
<div class="block">Maximum speed of the drive motors in meters per second.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="lastState">
|
||||
<h3>lastState</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">edu.wpi.first.math.kinematics.SwerveModuleState</span> <span class="element-name">lastState</span></div>
|
||||
@@ -338,15 +371,18 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>(int,swervelib.parser.SwerveModuleConfiguration)">
|
||||
<section class="detail" id="<init>(int,swervelib.parser.SwerveModuleConfiguration,edu.wpi.first.math.controller.SimpleMotorFeedforward)">
|
||||
<h3>SwerveModule</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">SwerveModule</span><wbr><span class="parameters">(int moduleNumber,
|
||||
<a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a> moduleConfiguration)</span></div>
|
||||
<a href="parser/SwerveModuleConfiguration.html" title="class in swervelib.parser">SwerveModuleConfiguration</a> moduleConfiguration,
|
||||
edu.wpi.first.math.controller.SimpleMotorFeedforward driveFeedforward)</span></div>
|
||||
<div class="block">Construct the swerve module and initialize the swerve module motors and absolute encoder.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>moduleNumber</code> - Module number for kinematics.</dd>
|
||||
<dd><code>moduleConfiguration</code> - Module constants containing CAN ID's and offsets.</dd>
|
||||
<dd><code>driveFeedforward</code> - Drive motor feedforward created by
|
||||
<a href="math/SwerveMath.html#createDriveFeedforward(double,double,double)"><code>SwerveMath.createDriveFeedforward(double, double, double)</code></a>.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
@@ -359,6 +395,28 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Method Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="setAngleMotorVoltageCompensation(double)">
|
||||
<h3>setAngleMotorVoltageCompensation</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setAngleMotorVoltageCompensation</span><wbr><span class="parameters">(double optimalVoltage)</span></div>
|
||||
<div class="block">Set the voltage compensation for the swerve module motor.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>optimalVoltage</code> - Nominal voltage for operation to output to.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setDriveMotorVoltageCompensation(double)">
|
||||
<h3>setDriveMotorVoltageCompensation</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setDriveMotorVoltageCompensation</span><wbr><span class="parameters">(double optimalVoltage)</span></div>
|
||||
<div class="block">Set the voltage compensation for the swerve module motor.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>optimalVoltage</code> - Nominal voltage for operation to output to.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="queueSynchronizeEncoders()">
|
||||
<h3>queueSynchronizeEncoders</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">queueSynchronizeEncoders</span>()</div>
|
||||
@@ -449,6 +507,30 @@ loadScripts(document, 'script');</script>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setAngleMotorConversionFactor(double)">
|
||||
<h3>setAngleMotorConversionFactor</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setAngleMotorConversionFactor</span><wbr><span class="parameters">(double conversionFactor)</span></div>
|
||||
<div class="block">Set the conversion factor for the angle/azimuth motor controller.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>conversionFactor</code> - Angle motor conversion factor for PID, should be generated from
|
||||
<a href="math/SwerveMath.html#calculateDegreesPerSteeringRotation(double,double)"><code>SwerveMath.calculateDegreesPerSteeringRotation(double, double)</code></a> or calculated.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setDriveMotorConversionFactor(double)">
|
||||
<h3>setDriveMotorConversionFactor</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setDriveMotorConversionFactor</span><wbr><span class="parameters">(double conversionFactor)</span></div>
|
||||
<div class="block">Set the conversion factor for the drive motor controller.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>conversionFactor</code> - Drive motor conversion factor for PID, should be generated from
|
||||
<a href="math/SwerveMath.html#calculateMetersPerRotation(double,double,double)"><code>SwerveMath.calculateMetersPerRotation(double, double, double)</code></a> or calculated.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getAngleMotor()">
|
||||
<h3>getAngleMotor</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="motors/SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></span> <span class="element-name">getAngleMotor</span>()</div>
|
||||
|
||||
Reference in New Issue
Block a user