mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
950 lines
41 KiB
HTML
950 lines
41 KiB
HTML
|
|
<!DOCTYPE HTML>
|
||
|
|
<!-- NewPage -->
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<!-- Generated by javadoc (11.0.17) on Mon Feb 13 14:36:54 CST 2023 -->
|
||
|
|
<title>SparkMaxSwerve</title>
|
||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
|
<meta name="dc.created" content="2023-02-13">
|
||
|
|
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
|
||
|
|
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/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="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
|
||
|
|
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
||
|
|
<!--[if IE]>
|
||
|
|
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
||
|
|
<![endif]-->
|
||
|
|
<script type="text/javascript" src="../../../../../../jquery/jquery-3.6.0.min.js"></script>
|
||
|
|
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.min.js"></script>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<script type="text/javascript"><!--
|
||
|
|
try {
|
||
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
||
|
|
parent.document.title="SparkMaxSwerve";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
catch(err) {
|
||
|
|
}
|
||
|
|
//-->
|
||
|
|
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10};
|
||
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||
|
|
var altColor = "altColor";
|
||
|
|
var rowColor = "rowColor";
|
||
|
|
var tableTab = "tableTab";
|
||
|
|
var activeTableTab = "activeTableTab";
|
||
|
|
var pathtoroot = "../../../../../../";
|
||
|
|
var useModuleDirectories = true;
|
||
|
|
loadScripts(document, 'script');</script>
|
||
|
|
<noscript>
|
||
|
|
<div>JavaScript is disabled on your browser.</div>
|
||
|
|
</noscript>
|
||
|
|
<header role="banner">
|
||
|
|
<nav role="navigation">
|
||
|
|
<div class="fixedNav">
|
||
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||
|
|
<div class="topNav"><a id="navbar.top">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||
|
|
<a id="navbar.top.firstrow">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="navList" title="Navigation">
|
||
|
|
<li><a href="../../../../../../index.html">Overview</a></li>
|
||
|
|
<li><a href="package-summary.html">Package</a></li>
|
||
|
|
<li class="navBarCell1Rev">Class</li>
|
||
|
|
<li><a href="package-tree.html">Tree</a></li>
|
||
|
|
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
|
||
|
|
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
|
||
|
|
<li><a href="../../../../../../help-doc.html">Help</a></li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
<div class="subNav">
|
||
|
|
<ul class="navList" id="allclasses_navbar_top">
|
||
|
|
<li><a href="../../../../../../allclasses.html">All Classes</a></li>
|
||
|
|
</ul>
|
||
|
|
<ul class="navListSearch">
|
||
|
|
<li><label for="search">SEARCH:</label>
|
||
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
||
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<div>
|
||
|
|
<script type="text/javascript"><!--
|
||
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||
|
|
if(window==top) {
|
||
|
|
allClassesLink.style.display = "block";
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
allClassesLink.style.display = "none";
|
||
|
|
}
|
||
|
|
//-->
|
||
|
|
</script>
|
||
|
|
<noscript>
|
||
|
|
<div>JavaScript is disabled on your browser.</div>
|
||
|
|
</noscript>
|
||
|
|
</div>
|
||
|
|
<div>
|
||
|
|
<ul class="subNavList">
|
||
|
|
<li>Summary: </li>
|
||
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
||
|
|
<li><a href="#field.summary">Field</a> | </li>
|
||
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
||
|
|
<li><a href="#method.summary">Method</a></li>
|
||
|
|
</ul>
|
||
|
|
<ul class="subNavList">
|
||
|
|
<li>Detail: </li>
|
||
|
|
<li><a href="#field.detail">Field</a> | </li>
|
||
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
||
|
|
<li><a href="#method.detail">Method</a></li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
<a id="skip.navbar.top">
|
||
|
|
<!-- -->
|
||
|
|
</a></div>
|
||
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||
|
|
</div>
|
||
|
|
<div class="navPadding"> </div>
|
||
|
|
<script type="text/javascript"><!--
|
||
|
|
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||
|
|
//-->
|
||
|
|
</script>
|
||
|
|
</nav>
|
||
|
|
</header>
|
||
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
||
|
|
<main role="main">
|
||
|
|
<div class="header">
|
||
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">frc.robot.subsystems.swervedrive2.swervelib.motors</a></div>
|
||
|
|
<h2 title="Class SparkMaxSwerve" class="title">Class SparkMaxSwerve</h2>
|
||
|
|
</div>
|
||
|
|
<div class="contentContainer">
|
||
|
|
<ul class="inheritance">
|
||
|
|
<li><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li>
|
||
|
|
<li>
|
||
|
|
<ul class="inheritance">
|
||
|
|
<li><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">frc.robot.subsystems.swervedrive2.swervelib.motors.SwerveMotor</a></li>
|
||
|
|
<li>
|
||
|
|
<ul class="inheritance">
|
||
|
|
<li>frc.robot.subsystems.swervedrive2.swervelib.motors.SparkMaxSwerve</li>
|
||
|
|
</ul>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<div class="description">
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<hr>
|
||
|
|
<pre>public class <span class="typeNameLabel">SparkMaxSwerve</span>
|
||
|
|
extends <a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></pre>
|
||
|
|
<div class="block">An implementation of <code>CANSparkMax</code> as a <a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors"><code>SwerveMotor</code></a>.</div>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
<div class="summary">
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||
|
|
<section>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList"><a id="nested.class.summary">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<h3>Nested Class Summary</h3>
|
||
|
|
<table class="memberSummary">
|
||
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
|
||
|
|
<tr>
|
||
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||
|
|
<th class="colSecond" scope="col">Class</th>
|
||
|
|
<th class="colLast" scope="col">Description</th>
|
||
|
|
</tr>
|
||
|
|
<tr class="altColor">
|
||
|
|
<td class="colFirst"><code>(package private) static class </code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SparkMaxSwerve.SparkMAX_slotIdx.html" title="enum in frc.robot.subsystems.swervedrive2.swervelib.motors">SparkMaxSwerve.SparkMAX_slotIdx</a></span></code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">REV Slots for PID configuration.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</section>
|
||
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
||
|
|
<section>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList"><a id="field.summary">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<h3>Field Summary</h3>
|
||
|
|
<table class="memberSummary">
|
||
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
||
|
|
<tr>
|
||
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||
|
|
<th class="colSecond" scope="col">Field</th>
|
||
|
|
<th class="colLast" scope="col">Description</th>
|
||
|
|
</tr>
|
||
|
|
<tr class="altColor">
|
||
|
|
<td class="colFirst"><code>com.revrobotics.AbsoluteEncoder</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#absoluteEncoder">absoluteEncoder</a></span></code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Absolute encoder attached to the SparkMax (if exists)</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr class="rowColor">
|
||
|
|
<td class="colFirst"><code>com.revrobotics.RelativeEncoder</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#encoder">encoder</a></span></code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Integrated encoder.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr class="altColor">
|
||
|
|
<td class="colFirst"><code>private boolean</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#factoryDefaultOccurred">factoryDefaultOccurred</a></span></code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Factory default already occurred.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr class="rowColor">
|
||
|
|
<td class="colFirst"><code>com.revrobotics.CANSparkMax</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#motor">motor</a></span></code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">SparkMAX Instance.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr class="altColor">
|
||
|
|
<td class="colFirst"><code>com.revrobotics.SparkMaxPIDController</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#pid">pid</a></span></code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Closed-loop PID controller.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList"><a id="fields.inherited.from.class.frc.robot.subsystems.swervedrive2.swervelib.motors.SwerveMotor">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<h3>Fields inherited from class frc.robot.subsystems.swervedrive2.swervelib.motors.<a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></h3>
|
||
|
|
<code><a href="SwerveMotor.html#isDriveMotor">isDriveMotor</a></code></li>
|
||
|
|
</ul>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</section>
|
||
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||
|
|
<section>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList"><a id="constructor.summary">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<h3>Constructor Summary</h3>
|
||
|
|
<table class="memberSummary">
|
||
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||
|
|
<tr>
|
||
|
|
<th class="colFirst" scope="col">Constructor</th>
|
||
|
|
<th class="colLast" scope="col">Description</th>
|
||
|
|
</tr>
|
||
|
|
<tr class="altColor">
|
||
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int,boolean)">SparkMaxSwerve</a></span>​(int id,
|
||
|
|
boolean isDriveMotor)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Initialize the <a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors"><code>SwerveMotor</code></a> as a <code>CANSparkMax</code> connected to a Brushless Motor.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr class="rowColor">
|
||
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(com.revrobotics.CANSparkMax,boolean)">SparkMaxSwerve</a></span>​(com.revrobotics.CANSparkMax motor,
|
||
|
|
boolean isDriveMotor)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Initialize the swerve motor.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</section>
|
||
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
||
|
|
<section>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList"><a id="method.summary">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<h3>Method Summary</h3>
|
||
|
|
<table class="memberSummary">
|
||
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
||
|
|
<tr>
|
||
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||
|
|
<th class="colSecond" scope="col">Method</th>
|
||
|
|
<th class="colLast" scope="col">Description</th>
|
||
|
|
</tr>
|
||
|
|
<tr id="i0" class="altColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#burnFlash()">burnFlash</a></span>()</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Save the configurations from flash to EEPROM.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i1" class="rowColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clearStickyFaults()">clearStickyFaults</a></span>()</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Clear the sticky faults on the motor controller.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i2" class="altColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#configureCANStatusFrames(int,int,int,int,int)">configureCANStatusFrames</a></span>​(int CANStatus0,
|
||
|
|
int CANStatus1,
|
||
|
|
int CANStatus2,
|
||
|
|
int CANStatus3,
|
||
|
|
int CANStatus4)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Set the CAN status frames.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i3" class="rowColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#configureIntegratedEncoder(double)">configureIntegratedEncoder</a></span>​(double positionConversionFactor)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Configure the integrated encoder for the swerve module.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i4" class="altColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#configurePIDF(frc.robot.subsystems.swervedrive2.swervelib.parser.PIDFConfig)">configurePIDF</a></span>​(<a href="../parser/PIDFConfig.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.parser">PIDFConfig</a> config)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Configure the PIDF values for the closed loop controller.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i5" class="rowColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#configurePIDWrapping(double,double)">configurePIDWrapping</a></span>​(double minInput,
|
||
|
|
double maxInput)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Configure the PID wrapping for the position closed loop controller.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i6" class="altColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#factoryDefaults()">factoryDefaults</a></span>()</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Configure the factory defaults.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i7" class="rowColor">
|
||
|
|
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMotor()">getMotor</a></span>()</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Get the motor object from the module.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i8" class="altColor">
|
||
|
|
<td class="colFirst"><code>double</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPosition()">getPosition</a></span>()</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Get the position of the integrated encoder.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i9" class="rowColor">
|
||
|
|
<td class="colFirst"><code>double</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getVelocity()">getVelocity</a></span>()</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Get the velocity of the integrated encoder.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i10" class="altColor">
|
||
|
|
<td class="colFirst"><code>boolean</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAttachedAbsoluteEncoder()">isAttachedAbsoluteEncoder</a></span>()</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Queries whether the absolute encoder is directly attached to the motor controller.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i11" class="rowColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#set(double)">set</a></span>​(double percentOutput)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Set the percentage output.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i12" class="altColor">
|
||
|
|
<td class="colFirst"><code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAbsoluteEncoder(frc.robot.subsystems.swervedrive2.swervelib.encoders.SwerveAbsoluteEncoder)">setAbsoluteEncoder</a></span>​(<a href="../encoders/SwerveAbsoluteEncoder.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.encoders">SwerveAbsoluteEncoder</a> encoder)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Set the absolute encoder to be a compatible absolute encoder.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i13" class="rowColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCurrentLimit(int)">setCurrentLimit</a></span>​(int currentLimit)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<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>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i14" class="altColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setInverted(boolean)">setInverted</a></span>​(boolean inverted)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Set the motor to be inverted.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i15" class="rowColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLoopRampRate(double)">setLoopRampRate</a></span>​(double rampRate)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Set the maximum rate the open/closed loop output can change by.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i16" class="altColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMotorBrake(boolean)">setMotorBrake</a></span>​(boolean isBrakeMode)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Set the idle mode.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i17" class="rowColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPosition(double)">setPosition</a></span>​(double position)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Set the integrated encoder position.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i18" class="altColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setReference(double,double)">setReference</a></span>​(double setpoint,
|
||
|
|
double feedforward)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Set the closed loop PID controller reference point.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr id="i19" class="rowColor">
|
||
|
|
<td class="colFirst"><code>void</code></td>
|
||
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setVoltageCompensation(double)">setVoltageCompensation</a></span>​(double nominalVoltage)</code></th>
|
||
|
|
<td class="colLast">
|
||
|
|
<div class="block">Set the voltage compensation for the swerve module motor.</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
|
||
|
|
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
|
||
|
|
</ul>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</section>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
<div class="details">
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<!-- ============ FIELD DETAIL =========== -->
|
||
|
|
<section>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList"><a id="field.detail">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<h3>Field Detail</h3>
|
||
|
|
<a id="motor">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>motor</h4>
|
||
|
|
<pre>public com.revrobotics.CANSparkMax motor</pre>
|
||
|
|
<div class="block">SparkMAX Instance.</div>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="encoder">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>encoder</h4>
|
||
|
|
<pre>public com.revrobotics.RelativeEncoder encoder</pre>
|
||
|
|
<div class="block">Integrated encoder.</div>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="absoluteEncoder">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>absoluteEncoder</h4>
|
||
|
|
<pre>public com.revrobotics.AbsoluteEncoder absoluteEncoder</pre>
|
||
|
|
<div class="block">Absolute encoder attached to the SparkMax (if exists)</div>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="pid">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>pid</h4>
|
||
|
|
<pre>public com.revrobotics.SparkMaxPIDController pid</pre>
|
||
|
|
<div class="block">Closed-loop PID controller.</div>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="factoryDefaultOccurred">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockListLast">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>factoryDefaultOccurred</h4>
|
||
|
|
<pre>private boolean factoryDefaultOccurred</pre>
|
||
|
|
<div class="block">Factory default already occurred.</div>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</section>
|
||
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||
|
|
<section>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList"><a id="constructor.detail">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<h3>Constructor Detail</h3>
|
||
|
|
<a id="<init>(com.revrobotics.CANSparkMax,boolean)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>SparkMaxSwerve</h4>
|
||
|
|
<pre>public SparkMaxSwerve​(com.revrobotics.CANSparkMax motor,
|
||
|
|
boolean isDriveMotor)</pre>
|
||
|
|
<div class="block">Initialize the swerve motor.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>motor</code> - The SwerveMotor as a SparkMax object.</dd>
|
||
|
|
<dd><code>isDriveMotor</code> - Is the motor being initialized a drive motor?</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="<init>(int,boolean)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockListLast">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>SparkMaxSwerve</h4>
|
||
|
|
<pre>public SparkMaxSwerve​(int id,
|
||
|
|
boolean isDriveMotor)</pre>
|
||
|
|
<div class="block">Initialize the <a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors"><code>SwerveMotor</code></a> as a <code>CANSparkMax</code> connected to a Brushless Motor.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>id</code> - CAN ID of the SparkMax.</dd>
|
||
|
|
<dd><code>isDriveMotor</code> - Is the motor being initialized a drive motor?</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</section>
|
||
|
|
<!-- ============ METHOD DETAIL ========== -->
|
||
|
|
<section>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList"><a id="method.detail">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<h3>Method Detail</h3>
|
||
|
|
<a id="setVoltageCompensation(double)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>setVoltageCompensation</h4>
|
||
|
|
<pre class="methodSignature">public void setVoltageCompensation​(double nominalVoltage)</pre>
|
||
|
|
<div class="block">Set the voltage compensation for the swerve module motor.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#setVoltageCompensation(double)">setVoltageCompensation</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>nominalVoltage</code> - Nominal voltage for operation to output to.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="setCurrentLimit(int)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>setCurrentLimit</h4>
|
||
|
|
<pre class="methodSignature">public void setCurrentLimit​(int currentLimit)</pre>
|
||
|
|
<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>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#setCurrentLimit(int)">setCurrentLimit</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>currentLimit</code> - Current limit in AMPS at free speed.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="setLoopRampRate(double)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>setLoopRampRate</h4>
|
||
|
|
<pre class="methodSignature">public void setLoopRampRate​(double rampRate)</pre>
|
||
|
|
<div class="block">Set the maximum rate the open/closed loop output can change by.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#setLoopRampRate(double)">setLoopRampRate</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>rampRate</code> - Time in seconds to go from 0 to full throttle.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="getMotor()">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>getMotor</h4>
|
||
|
|
<pre class="methodSignature">public <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> getMotor()</pre>
|
||
|
|
<div class="block">Get the motor object from the module.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#getMotor()">getMotor</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
||
|
|
<dd>Motor object.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="isAttachedAbsoluteEncoder()">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>isAttachedAbsoluteEncoder</h4>
|
||
|
|
<pre class="methodSignature">public boolean isAttachedAbsoluteEncoder()</pre>
|
||
|
|
<div class="block">Queries whether the absolute encoder is directly attached to the motor controller.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#isAttachedAbsoluteEncoder()">isAttachedAbsoluteEncoder</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
||
|
|
<dd>connected absolute encoder state.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="factoryDefaults()">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>factoryDefaults</h4>
|
||
|
|
<pre class="methodSignature">public void factoryDefaults()</pre>
|
||
|
|
<div class="block">Configure the factory defaults.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#factoryDefaults()">factoryDefaults</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="clearStickyFaults()">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>clearStickyFaults</h4>
|
||
|
|
<pre class="methodSignature">public void clearStickyFaults()</pre>
|
||
|
|
<div class="block">Clear the sticky faults on the motor controller.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#clearStickyFaults()">clearStickyFaults</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="setAbsoluteEncoder(frc.robot.subsystems.swervedrive2.swervelib.encoders.SwerveAbsoluteEncoder)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>setAbsoluteEncoder</h4>
|
||
|
|
<pre class="methodSignature">public <a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a> setAbsoluteEncoder​(<a href="../encoders/SwerveAbsoluteEncoder.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.encoders">SwerveAbsoluteEncoder</a> encoder)</pre>
|
||
|
|
<div class="block">Set the absolute encoder to be a compatible absolute encoder.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#setAbsoluteEncoder(frc.robot.subsystems.swervedrive2.swervelib.encoders.SwerveAbsoluteEncoder)">setAbsoluteEncoder</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>encoder</code> - The encoder to use.</dd>
|
||
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
||
|
|
<dd>The <a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors"><code>SwerveMotor</code></a> for easy instantiation.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="configureIntegratedEncoder(double)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>configureIntegratedEncoder</h4>
|
||
|
|
<pre class="methodSignature">public void configureIntegratedEncoder​(double positionConversionFactor)</pre>
|
||
|
|
<div class="block">Configure the integrated encoder for the swerve module. Sets the conversion factors for position and velocity.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#configureIntegratedEncoder(double)">configureIntegratedEncoder</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>positionConversionFactor</code> - The conversion factor to apply.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="configurePIDF(frc.robot.subsystems.swervedrive2.swervelib.parser.PIDFConfig)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>configurePIDF</h4>
|
||
|
|
<pre class="methodSignature">public void configurePIDF​(<a href="../parser/PIDFConfig.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.parser">PIDFConfig</a> config)</pre>
|
||
|
|
<div class="block">Configure the PIDF values for the closed loop controller.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#configurePIDF(frc.robot.subsystems.swervedrive2.swervelib.parser.PIDFConfig)">configurePIDF</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>config</code> - Configuration class holding the PIDF values.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="configurePIDWrapping(double,double)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>configurePIDWrapping</h4>
|
||
|
|
<pre class="methodSignature">public void configurePIDWrapping​(double minInput,
|
||
|
|
double maxInput)</pre>
|
||
|
|
<div class="block">Configure the PID wrapping for the position closed loop controller.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#configurePIDWrapping(double,double)">configurePIDWrapping</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>minInput</code> - Minimum PID input.</dd>
|
||
|
|
<dd><code>maxInput</code> - Maximum PID input.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="configureCANStatusFrames(int,int,int,int,int)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>configureCANStatusFrames</h4>
|
||
|
|
<pre class="methodSignature">public void configureCANStatusFrames​(int CANStatus0,
|
||
|
|
int CANStatus1,
|
||
|
|
int CANStatus2,
|
||
|
|
int CANStatus3,
|
||
|
|
int CANStatus4)</pre>
|
||
|
|
<div class="block">Set the CAN status frames.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>CANStatus0</code> - Applied Output, Faults, Sticky Faults, Is Follower</dd>
|
||
|
|
<dd><code>CANStatus1</code> - Motor Velocity, Motor Temperature, Motor Voltage, Motor Current</dd>
|
||
|
|
<dd><code>CANStatus2</code> - Motor Position</dd>
|
||
|
|
<dd><code>CANStatus3</code> - Analog Sensor Voltage, Analog Sensor Velocity, Analog Sensor Position</dd>
|
||
|
|
<dd><code>CANStatus4</code> - Alternate Encoder Velocity, Alternate Encoder Position</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="setMotorBrake(boolean)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>setMotorBrake</h4>
|
||
|
|
<pre class="methodSignature">public void setMotorBrake​(boolean isBrakeMode)</pre>
|
||
|
|
<div class="block">Set the idle mode.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#setMotorBrake(boolean)">setMotorBrake</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>isBrakeMode</code> - Set the brake mode.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="setInverted(boolean)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>setInverted</h4>
|
||
|
|
<pre class="methodSignature">public void setInverted​(boolean inverted)</pre>
|
||
|
|
<div class="block">Set the motor to be inverted.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#setInverted(boolean)">setInverted</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>inverted</code> - State of inversion.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="burnFlash()">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>burnFlash</h4>
|
||
|
|
<pre class="methodSignature">public void burnFlash()</pre>
|
||
|
|
<div class="block">Save the configurations from flash to EEPROM.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#burnFlash()">burnFlash</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="set(double)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>set</h4>
|
||
|
|
<pre class="methodSignature">public void set​(double percentOutput)</pre>
|
||
|
|
<div class="block">Set the percentage output.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#set(double)">set</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>percentOutput</code> - percent out for the motor controller.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="setReference(double,double)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>setReference</h4>
|
||
|
|
<pre class="methodSignature">public void setReference​(double setpoint,
|
||
|
|
double feedforward)</pre>
|
||
|
|
<div class="block">Set the closed loop PID controller reference point.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#setReference(double,double)">setReference</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>setpoint</code> - Setpoint in MPS or Angle in degrees.</dd>
|
||
|
|
<dd><code>feedforward</code> - Feedforward in volt-meter-per-second or kV.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="getVelocity()">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>getVelocity</h4>
|
||
|
|
<pre class="methodSignature">public double getVelocity()</pre>
|
||
|
|
<div class="block">Get the velocity of the integrated encoder.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#getVelocity()">getVelocity</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
||
|
|
<dd>velocity</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="getPosition()">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockList">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>getPosition</h4>
|
||
|
|
<pre class="methodSignature">public double getPosition()</pre>
|
||
|
|
<div class="block">Get the position of the integrated encoder.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#getPosition()">getPosition</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
||
|
|
<dd>Position</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
<a id="setPosition(double)">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="blockListLast">
|
||
|
|
<li class="blockList">
|
||
|
|
<h4>setPosition</h4>
|
||
|
|
<pre class="methodSignature">public void setPosition​(double position)</pre>
|
||
|
|
<div class="block">Set the integrated encoder position.</div>
|
||
|
|
<dl>
|
||
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||
|
|
<dd><code><a href="SwerveMotor.html#setPosition(double)">setPosition</a></code> in class <code><a href="SwerveMotor.html" title="class in frc.robot.subsystems.swervedrive2.swervelib.motors">SwerveMotor</a></code></dd>
|
||
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
||
|
|
<dd><code>position</code> - Integrated encoder position.</dd>
|
||
|
|
</dl>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</section>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</main>
|
||
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
||
|
|
<footer role="contentinfo">
|
||
|
|
<nav role="navigation">
|
||
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||
|
|
<div class="bottomNav"><a id="navbar.bottom">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||
|
|
<a id="navbar.bottom.firstrow">
|
||
|
|
<!-- -->
|
||
|
|
</a>
|
||
|
|
<ul class="navList" title="Navigation">
|
||
|
|
<li><a href="../../../../../../index.html">Overview</a></li>
|
||
|
|
<li><a href="package-summary.html">Package</a></li>
|
||
|
|
<li class="navBarCell1Rev">Class</li>
|
||
|
|
<li><a href="package-tree.html">Tree</a></li>
|
||
|
|
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
|
||
|
|
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
|
||
|
|
<li><a href="../../../../../../help-doc.html">Help</a></li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
<div class="subNav">
|
||
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||
|
|
<li><a href="../../../../../../allclasses.html">All Classes</a></li>
|
||
|
|
</ul>
|
||
|
|
<div>
|
||
|
|
<script type="text/javascript"><!--
|
||
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||
|
|
if(window==top) {
|
||
|
|
allClassesLink.style.display = "block";
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
allClassesLink.style.display = "none";
|
||
|
|
}
|
||
|
|
//-->
|
||
|
|
</script>
|
||
|
|
<noscript>
|
||
|
|
<div>JavaScript is disabled on your browser.</div>
|
||
|
|
</noscript>
|
||
|
|
</div>
|
||
|
|
<div>
|
||
|
|
<ul class="subNavList">
|
||
|
|
<li>Summary: </li>
|
||
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
||
|
|
<li><a href="#field.summary">Field</a> | </li>
|
||
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
||
|
|
<li><a href="#method.summary">Method</a></li>
|
||
|
|
</ul>
|
||
|
|
<ul class="subNavList">
|
||
|
|
<li>Detail: </li>
|
||
|
|
<li><a href="#field.detail">Field</a> | </li>
|
||
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
||
|
|
<li><a href="#method.detail">Method</a></li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
<a id="skip.navbar.bottom">
|
||
|
|
<!-- -->
|
||
|
|
</a></div>
|
||
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||
|
|
</nav>
|
||
|
|
</footer>
|
||
|
|
</body>
|
||
|
|
</html>
|