Files
YAGSL/docs/swervelib/motors/SwerveMotor.html
2023-02-16 22:12:57 -06:00

489 lines
31 KiB
HTML

<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Thu Feb 16 22:12:26 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">
<meta name="dc.created" content="2023-02-16">
<meta name="description" content="declaration: package: swervelib.motors, class: SwerveMotor">
<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.motors</a></div>
<h1 title="Class SwerveMotor" class="title">Class SwerveMotor</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.motors.SwerveMotor</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="SparkMaxSwerve.html" title="class in swervelib.motors">SparkMaxSwerve</a></code>, <code><a href="TalonFXSwerve.html" title="class in swervelib.motors">TalonFXSwerve</a></code>, <code><a href="TalonSRXSwerve.html" title="class in swervelib.motors">TalonSRXSwerve</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">SwerveMotor</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">Swerve motor abstraction which defines a standard interface for motors within a swerve module.</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>protected boolean</code></div>
<div class="col-second even-row-color"><code><a href="#isDriveMotor" class="member-name-link">isDriveMotor</a></code></div>
<div class="col-last even-row-color">
<div class="block">Whether the swerve motor is a drive motor.</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">SwerveMotor</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</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-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract 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-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#burnFlash()" class="member-name-link">burnFlash</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Save the configurations from flash to EEPROM.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#clearStickyFaults()" class="member-name-link">clearStickyFaults</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Clear the sticky faults on the motor controller.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#configureIntegratedEncoder(double)" class="member-name-link">configureIntegratedEncoder</a><wbr>(double&nbsp;positionConversionFactor)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Configure the integrated encoder for the swerve module.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#configurePIDF(swervelib.parser.PIDFConfig)" class="member-name-link">configurePIDF</a><wbr>(<a href="../parser/PIDFConfig.html" title="class in swervelib.parser">PIDFConfig</a>&nbsp;config)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Configure the PIDF values for the closed loop controller.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#configurePIDWrapping(double,double)" class="member-name-link">configurePIDWrapping</a><wbr>(double&nbsp;minInput,
double&nbsp;maxInput)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Configure the PID wrapping for the position closed loop controller.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#factoryDefaults()" class="member-name-link">factoryDefaults</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Configure the factory defaults.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <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-tab3"><code><a href="#getMotor()" class="member-name-link">getMotor</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Get the motor object from the module.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract double</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getPosition()" class="member-name-link">getPosition</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Get the position of the integrated encoder.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getVelocity()" class="member-name-link">getVelocity</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Get the velocity of the integrated encoder.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isAttachedAbsoluteEncoder()" class="member-name-link">isAttachedAbsoluteEncoder</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Queries whether the absolute encoder is directly attached to the motor controller.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#set(double)" class="member-name-link">set</a><wbr>(double&nbsp;percentOutput)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the percentage output.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <a href="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-tab3"><code><a href="#setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)" class="member-name-link">setAbsoluteEncoder</a><wbr>(<a href="../encoders/SwerveAbsoluteEncoder.html" title="class in swervelib.encoders">SwerveAbsoluteEncoder</a>&nbsp;encoder)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the absolute encoder to be a compatible absolute encoder.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setCurrentLimit(int)" class="member-name-link">setCurrentLimit</a><wbr>(int&nbsp;currentLimit)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the current limit for the swerve drive motor, remember this may cause jumping if used in conjunction with
voltage compensation.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setInverted(boolean)" class="member-name-link">setInverted</a><wbr>(boolean&nbsp;inverted)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the motor to be inverted.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setLoopRampRate(double)" class="member-name-link">setLoopRampRate</a><wbr>(double&nbsp;rampRate)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the maximum rate the open/closed loop output can change by.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setMotorBrake(boolean)" class="member-name-link">setMotorBrake</a><wbr>(boolean&nbsp;isBrakeMode)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the idle mode.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setPosition(double)" class="member-name-link">setPosition</a><wbr>(double&nbsp;position)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the integrated encoder position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setReference(double,double)" class="member-name-link">setReference</a><wbr>(double&nbsp;setpoint,
double&nbsp;feedforward)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the closed loop PID controller reference point.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setVoltageCompensation(double)" class="member-name-link">setVoltageCompensation</a><wbr>(double&nbsp;nominalVoltage)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the voltage compensation for the swerve module motor.</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="isDriveMotor">
<h3>isDriveMotor</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isDriveMotor</span></div>
<div class="block">Whether the swerve motor is a drive motor.</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>SwerveMotor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">SwerveMotor</span>()</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="factoryDefaults()">
<h3>factoryDefaults</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">factoryDefaults</span>()</div>
<div class="block">Configure the factory defaults.</div>
</section>
</li>
<li>
<section class="detail" id="clearStickyFaults()">
<h3>clearStickyFaults</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">clearStickyFaults</span>()</div>
<div class="block">Clear the sticky faults on the motor controller.</div>
</section>
</li>
<li>
<section class="detail" id="setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)">
<h3>setAbsoluteEncoder</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type"><a href="SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></span>&nbsp;<span class="element-name">setAbsoluteEncoder</span><wbr><span class="parameters">(<a href="../encoders/SwerveAbsoluteEncoder.html" title="class in swervelib.encoders">SwerveAbsoluteEncoder</a>&nbsp;encoder)</span></div>
<div class="block">Set the absolute encoder to be a compatible absolute encoder.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>encoder</code> - The encoder to use.</dd>
<dt>Returns:</dt>
<dd>The <a href="SwerveMotor.html" title="class in swervelib.motors"><code>SwerveMotor</code></a> for single line configuration.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="configureIntegratedEncoder(double)">
<h3>configureIntegratedEncoder</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">configureIntegratedEncoder</span><wbr><span class="parameters">(double&nbsp;positionConversionFactor)</span></div>
<div class="block">Configure the integrated encoder for the swerve module. Sets the conversion factors for position and velocity.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>positionConversionFactor</code> - The conversion factor to apply for position.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="configurePIDF(swervelib.parser.PIDFConfig)">
<h3>configurePIDF</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">configurePIDF</span><wbr><span class="parameters">(<a href="../parser/PIDFConfig.html" title="class in swervelib.parser">PIDFConfig</a>&nbsp;config)</span></div>
<div class="block">Configure the PIDF values for the closed loop controller. 0 is disabled or off.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>config</code> - Configuration class holding the PIDF values.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="configurePIDWrapping(double,double)">
<h3>configurePIDWrapping</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">configurePIDWrapping</span><wbr><span class="parameters">(double&nbsp;minInput,
double&nbsp;maxInput)</span></div>
<div class="block">Configure the PID wrapping for the position closed loop controller.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>minInput</code> - Minimum PID input.</dd>
<dd><code>maxInput</code> - Maximum PID input.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setMotorBrake(boolean)">
<h3>setMotorBrake</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setMotorBrake</span><wbr><span class="parameters">(boolean&nbsp;isBrakeMode)</span></div>
<div class="block">Set the idle mode.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>isBrakeMode</code> - Set the brake mode.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setInverted(boolean)">
<h3>setInverted</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setInverted</span><wbr><span class="parameters">(boolean&nbsp;inverted)</span></div>
<div class="block">Set the motor to be inverted.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>inverted</code> - State of inversion.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="burnFlash()">
<h3>burnFlash</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">burnFlash</span>()</div>
<div class="block">Save the configurations from flash to EEPROM.</div>
</section>
</li>
<li>
<section class="detail" id="set(double)">
<h3>set</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">set</span><wbr><span class="parameters">(double&nbsp;percentOutput)</span></div>
<div class="block">Set the percentage output.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>percentOutput</code> - percent out for the motor controller.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setReference(double,double)">
<h3>setReference</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setReference</span><wbr><span class="parameters">(double&nbsp;setpoint,
double&nbsp;feedforward)</span></div>
<div class="block">Set the closed loop PID controller reference point.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>setpoint</code> - Setpoint in meters per second or angle in degrees.</dd>
<dd><code>feedforward</code> - Feedforward in volt-meter-per-second or kV.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getVelocity()">
<h3>getVelocity</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getVelocity</span>()</div>
<div class="block">Get the velocity of the integrated encoder.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>velocity in meters per second or degrees per second.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getPosition()">
<h3>getPosition</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getPosition</span>()</div>
<div class="block">Get the position of the integrated encoder.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Position in meters or degrees.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setPosition(double)">
<h3>setPosition</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setPosition</span><wbr><span class="parameters">(double&nbsp;position)</span></div>
<div class="block">Set the integrated encoder position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>position</code> - Integrated encoder position. Should be angle in degrees or meters per second.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setVoltageCompensation(double)">
<h3>setVoltageCompensation</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setVoltageCompensation</span><wbr><span class="parameters">(double&nbsp;nominalVoltage)</span></div>
<div class="block">Set the voltage compensation for the swerve module motor.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>nominalVoltage</code> - Nominal voltage for operation to output to.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setCurrentLimit(int)">
<h3>setCurrentLimit</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setCurrentLimit</span><wbr><span class="parameters">(int&nbsp;currentLimit)</span></div>
<div class="block">Set the current limit for the swerve drive motor, remember this may cause jumping if used in conjunction with
voltage compensation. This is useful to protect the motor from current spikes.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>currentLimit</code> - Current limit in AMPS at free speed.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setLoopRampRate(double)">
<h3>setLoopRampRate</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setLoopRampRate</span><wbr><span class="parameters">(double&nbsp;rampRate)</span></div>
<div class="block">Set the maximum rate the open/closed loop output can change by.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>rampRate</code> - Time in seconds to go from 0 to full throttle.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMotor()">
<h3>getMotor</h3>
<div class="member-signature"><span class="modifiers">public abstract</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">getMotor</span>()</div>
<div class="block">Get the motor object from the module.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Motor object.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isAttachedAbsoluteEncoder()">
<h3>isAttachedAbsoluteEncoder</h3>
<div class="member-signature"><span class="modifiers">public abstract</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isAttachedAbsoluteEncoder</span>()</div>
<div class="block">Queries whether the absolute encoder is directly attached to the motor controller.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>connected absolute encoder state.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>