mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-07-05 07:31:41 +00:00
Updated to 2024
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Tue Dec 12 10:48:21 CST 2023 -->
|
||||
<title>SparkMaxBrushedMotorSwerve</title>
|
||||
<!-- Generated by javadoc (17) -->
|
||||
<title>SparkMaxBrushedMotorSwerve (YAGSL-Example API)</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-12-12">
|
||||
<meta name="description" content="declaration: package: swervelib.motors, class: SparkMaxBrushedMotorSwerve">
|
||||
<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-3.6.0.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
@@ -36,7 +35,7 @@ loadScripts(document, 'script');</script>
|
||||
<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="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html#class">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -103,19 +102,14 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Integrated encoder.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>private boolean</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#factoryDefaultOccurred" class="member-name-link">factoryDefaultOccurred</a></code></div>
|
||||
<div class="col-first even-row-color"><code>com.revrobotics.CANSparkMax</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#motor" class="member-name-link">motor</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Factory default already occurred.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color"><code>com.revrobotics.CANSparkMax</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#motor" class="member-name-link">motor</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">SparkMAX Instance.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color"><code>com.revrobotics.SparkMaxPIDController</code></div>
|
||||
<div class="col-second even-row-color"><code><a href="#pid" class="member-name-link">pid</a></code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="col-first odd-row-color"><code>com.revrobotics.SparkPIDController</code></div>
|
||||
<div class="col-second odd-row-color"><code><a href="#pid" class="member-name-link">pid</a></code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
<div class="block">Closed-loop PID controller.</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,17 +126,17 @@ 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,boolean,com.revrobotics.SparkMaxRelativeEncoder.Type,int,boolean)" class="member-name-link">SparkMaxBrushedMotorSwerve</a><wbr>(int id,
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(int,boolean,com.revrobotics.SparkRelativeEncoder.Type,int,boolean)" class="member-name-link">SparkMaxBrushedMotorSwerve</a><wbr>(int id,
|
||||
boolean isDriveMotor,
|
||||
com.revrobotics.SparkMaxRelativeEncoder.Type encoderType,
|
||||
com.revrobotics.SparkRelativeEncoder.Type encoderType,
|
||||
int countsPerRevolution,
|
||||
boolean useDataPortQuadEncoder)</code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Initialize the <a href="SwerveMotor.html" title="class in swervelib.motors"><code>SwerveMotor</code></a> as a <code>CANSparkMax</code> connected to a Brushless Motor.</div>
|
||||
</div>
|
||||
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(com.revrobotics.CANSparkMax,boolean,com.revrobotics.SparkMaxRelativeEncoder.Type,int,boolean)" class="member-name-link">SparkMaxBrushedMotorSwerve</a><wbr>(com.revrobotics.CANSparkMax motor,
|
||||
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(com.revrobotics.CANSparkMax,boolean,com.revrobotics.SparkRelativeEncoder.Type,int,boolean)" class="member-name-link">SparkMaxBrushedMotorSwerve</a><wbr>(com.revrobotics.CANSparkMax motor,
|
||||
boolean isDriveMotor,
|
||||
com.revrobotics.SparkMaxRelativeEncoder.Type encoderType,
|
||||
com.revrobotics.SparkRelativeEncoder.Type encoderType,
|
||||
int countsPerRevolution,
|
||||
boolean useDataPortQuadEncoder)</code></div>
|
||||
<div class="col-last odd-row-color">
|
||||
@@ -197,88 +191,83 @@ loadScripts(document, 'script');</script>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Configure the PID wrapping for the position closed loop controller.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private void</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#configureSparkMax(java.util.function.Supplier)" class="member-name-link">configureSparkMax</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Supplier.html" title="class or interface in java.util.function" class="external-link">Supplier</a><com.revrobotics.REVLibError> config)</code></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="#factoryDefaults()" class="member-name-link">factoryDefaults</a>()</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Run the configuration until it succeeds or times out.</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="#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-tab4">
|
||||
<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-tab4"><code><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-tab4"><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-tab4">
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><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 odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMotor()" class="member-name-link">getMotor</a>()</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Get the motor object from the module.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#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-tab4">
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPosition()" class="member-name-link">getPosition</a>()</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Get the position of the integrated encoder.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#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-tab4">
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getVelocity()" class="member-name-link">getVelocity</a>()</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Get the velocity of the integrated encoder.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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-tab4">
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isAttachedAbsoluteEncoder()" class="member-name-link">isAttachedAbsoluteEncoder</a>()</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<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-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="#set(double)" class="member-name-link">set</a><wbr>(double percentOutput)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#set(double)" class="member-name-link">set</a><wbr>(double percentOutput)</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 percentage output.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><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-tab4"><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> encoder)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="SwerveMotor.html" title="class in swervelib.motors">SwerveMotor</a></code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><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> encoder)</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 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-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="#setCurrentLimit(int)" class="member-name-link">setCurrentLimit</a><wbr>(int currentLimit)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setCurrentLimit(int)" class="member-name-link">setCurrentLimit</a><wbr>(int currentLimit)</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 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-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="#setInverted(boolean)" class="member-name-link">setInverted</a><wbr>(boolean inverted)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setInverted(boolean)" class="member-name-link">setInverted</a><wbr>(boolean inverted)</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 motor to be inverted.</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="#setLoopRampRate(double)" class="member-name-link">setLoopRampRate</a><wbr>(double rampRate)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setLoopRampRate(double)" class="member-name-link">setLoopRampRate</a><wbr>(double rampRate)</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 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-tab4"><code>void</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setMotorBrake(boolean)" class="member-name-link">setMotorBrake</a><wbr>(boolean isBrakeMode)</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setMotorBrake(boolean)" class="member-name-link">setMotorBrake</a><wbr>(boolean isBrakeMode)</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 idle mode.</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="#setPosition(double)" class="member-name-link">setPosition</a><wbr>(double position)</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setPosition(double)" class="member-name-link">setPosition</a><wbr>(double position)</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 integrated encoder position.</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="#setReference(double,double)" class="member-name-link">setReference</a><wbr>(double setpoint,
|
||||
double feedforward)</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 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-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="#setReference(double,double,double)" class="member-name-link">setReference</a><wbr>(double setpoint,
|
||||
double feedforward,
|
||||
double position)</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setReference(double,double)" class="member-name-link">setReference</a><wbr>(double setpoint,
|
||||
double feedforward)</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 closed loop PID controller reference point.</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="#setVoltageCompensation(double)" class="member-name-link">setVoltageCompensation</a><wbr>(double nominalVoltage)</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setReference(double,double,double)" class="member-name-link">setReference</a><wbr>(double setpoint,
|
||||
double feedforward,
|
||||
double position)</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 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-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="#setVoltageCompensation(double)" class="member-name-link">setVoltageCompensation</a><wbr>(double nominalVoltage)</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>
|
||||
@@ -322,17 +311,10 @@ loadScripts(document, 'script');</script>
|
||||
<li>
|
||||
<section class="detail" id="pid">
|
||||
<h3>pid</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">com.revrobotics.SparkMaxPIDController</span> <span class="element-name">pid</span></div>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">com.revrobotics.SparkPIDController</span> <span class="element-name">pid</span></div>
|
||||
<div class="block">Closed-loop PID controller.</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="factoryDefaultOccurred">
|
||||
<h3>factoryDefaultOccurred</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">boolean</span> <span class="element-name">factoryDefaultOccurred</span></div>
|
||||
<div class="block">Factory default already occurred.</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
@@ -342,11 +324,11 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>(com.revrobotics.CANSparkMax,boolean,com.revrobotics.SparkMaxRelativeEncoder.Type,int,boolean)">
|
||||
<section class="detail" id="<init>(com.revrobotics.CANSparkMax,boolean,com.revrobotics.SparkRelativeEncoder.Type,int,boolean)">
|
||||
<h3>SparkMaxBrushedMotorSwerve</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">SparkMaxBrushedMotorSwerve</span><wbr><span class="parameters">(com.revrobotics.CANSparkMax motor,
|
||||
boolean isDriveMotor,
|
||||
com.revrobotics.SparkMaxRelativeEncoder.Type encoderType,
|
||||
com.revrobotics.SparkRelativeEncoder.Type encoderType,
|
||||
int countsPerRevolution,
|
||||
boolean useDataPortQuadEncoder)</span></div>
|
||||
<div class="block">Initialize the swerve motor.</div>
|
||||
@@ -354,18 +336,18 @@ loadScripts(document, 'script');</script>
|
||||
<dt>Parameters:</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>
|
||||
<dd><code>encoderType</code> - <code>SparkMaxRelativeEncoder.Type</code> of encoder to use for the <code>CANSparkMax</code> device.</dd>
|
||||
<dd><code>countsPerRevolution</code> - The number of encoder pulses for the <code>SparkMaxRelativeEncoder.Type</code> encoder per revolution.</dd>
|
||||
<dd><code>encoderType</code> - <code>SparkRelativeEncoder.Type</code> of encoder to use for the <code>CANSparkMax</code> device.</dd>
|
||||
<dd><code>countsPerRevolution</code> - The number of encoder pulses for the <code>SparkRelativeEncoder.Type</code> encoder per revolution.</dd>
|
||||
<dd><code>useDataPortQuadEncoder</code> - Use the encoder attached to the data port of the spark max for a quadrature encoder.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="<init>(int,boolean,com.revrobotics.SparkMaxRelativeEncoder.Type,int,boolean)">
|
||||
<section class="detail" id="<init>(int,boolean,com.revrobotics.SparkRelativeEncoder.Type,int,boolean)">
|
||||
<h3>SparkMaxBrushedMotorSwerve</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">SparkMaxBrushedMotorSwerve</span><wbr><span class="parameters">(int id,
|
||||
boolean isDriveMotor,
|
||||
com.revrobotics.SparkMaxRelativeEncoder.Type encoderType,
|
||||
com.revrobotics.SparkRelativeEncoder.Type encoderType,
|
||||
int countsPerRevolution,
|
||||
boolean useDataPortQuadEncoder)</span></div>
|
||||
<div class="block">Initialize the <a href="SwerveMotor.html" title="class in swervelib.motors"><code>SwerveMotor</code></a> as a <code>CANSparkMax</code> connected to a Brushless Motor.</div>
|
||||
@@ -373,8 +355,8 @@ loadScripts(document, 'script');</script>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>id</code> - CAN ID of the SparkMax.</dd>
|
||||
<dd><code>isDriveMotor</code> - Is the motor being initialized a drive motor?</dd>
|
||||
<dd><code>encoderType</code> - <code>SparkMaxRelativeEncoder.Type</code> of encoder to use for the <code>CANSparkMax</code> device.</dd>
|
||||
<dd><code>countsPerRevolution</code> - The number of encoder pulses for the <code>SparkMaxRelativeEncoder.Type</code> encoder per revolution.</dd>
|
||||
<dd><code>encoderType</code> - <code>SparkRelativeEncoder.Type</code> of encoder to use for the <code>CANSparkMax</code> device.</dd>
|
||||
<dd><code>countsPerRevolution</code> - The number of encoder pulses for the <code>SparkRelativeEncoder.Type</code> encoder per revolution.</dd>
|
||||
<dd><code>useDataPortQuadEncoder</code> - Use the encoder attached to the data port of the spark max for a quadrature encoder.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
@@ -388,17 +370,6 @@ loadScripts(document, 'script');</script>
|
||||
<h2>Method Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="configureSparkMax(java.util.function.Supplier)">
|
||||
<h3>configureSparkMax</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">void</span> <span class="element-name">configureSparkMax</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Supplier.html" title="class or interface in java.util.function" class="external-link">Supplier</a><com.revrobotics.REVLibError> config)</span></div>
|
||||
<div class="block">Run the configuration until it succeeds or times out.</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>config</code> - Lambda supplier returning the error state.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setVoltageCompensation(double)">
|
||||
<h3>setVoltageCompensation</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setVoltageCompensation</span><wbr><span class="parameters">(double nominalVoltage)</span></div>
|
||||
|
||||
Reference in New Issue
Block a user