2023-02-13 14:37:05 -06:00
<!DOCTYPE HTML>
< html lang = "en" >
< head >
2024-01-22 15:11:18 -06:00
<!-- Generated by javadoc (17) on Mon Jan 22 15:09:25 CST 2024 -->
2024-01-15 14:39:17 -06:00
< title > SwerveModule< / title >
2023-02-14 22:03:02 -06:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2023-02-13 14:37:05 -06:00
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" >
2024-01-22 15:11:18 -06:00
< meta name = "dc.created" content = "2024-01-22" >
2023-02-14 22:03:02 -06:00
< meta name = "description" content = "declaration: package: swervelib, class: SwerveModule" >
< meta name = "generator" content = "javadoc/ClassWriterImpl" >
2023-02-13 15:03:55 -06:00
< link rel = "stylesheet" type = "text/css" href = "../stylesheet.css" title = "Style" >
2023-02-14 22:03:02 -06:00
< link rel = "stylesheet" type = "text/css" href = "../script-dir/jquery-ui.min.css" title = "Style" >
2023-02-13 15:03:55 -06:00
< link rel = "stylesheet" type = "text/css" href = "../jquery-ui.overrides.css" title = "Style" >
< script type = "text/javascript" src = "../script.js" > < / script >
2024-01-15 14:39:17 -06:00
< script type = "text/javascript" src = "../script-dir/jquery-3.5.1.min.js" > < / script >
2023-02-14 22:03:02 -06:00
< script type = "text/javascript" src = "../script-dir/jquery-ui.min.js" > < / script >
2023-02-13 14:37:05 -06:00
< / head >
2023-02-14 22:03:02 -06:00
< body class = "class-declaration-page" >
< script type = "text/javascript" > v a r e v e n R o w C o l o r = " e v e n - r o w - c o l o r " ;
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
2023-02-13 15:03:55 -06:00
var pathtoroot = "../";
2023-02-13 14:37:05 -06:00
loadScripts(document, 'script');< / script >
< noscript >
< div > JavaScript is disabled on your browser.< / div >
< / noscript >
2023-02-14 22:03:02 -06:00
< div class = "flex-box" >
< header role = "banner" class = "flex-header" >
2023-02-13 14:37:05 -06:00
< nav role = "navigation" >
<!-- ========= START OF TOP NAVBAR ======= -->
2023-02-14 22:03:02 -06:00
< 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" >
2023-02-13 15:03:55 -06:00
< li > < a href = "../index.html" > Overview< / a > < / li >
2023-02-13 14:37:05 -06:00
< li > < a href = "package-summary.html" > Package< / a > < / li >
2023-02-14 22:03:02 -06:00
< li class = "nav-bar-cell1-rev" > Class< / li >
2023-02-13 14:37:05 -06:00
< li > < a href = "package-tree.html" > Tree< / a > < / li >
2024-01-15 14:39:17 -06:00
< li > < a href = "../index-files/index-1.html" > Index< / a > < / li >
2023-02-14 22:03:02 -06:00
< li > < a href = "../help-doc.html#class" > Help< / a > < / li >
2023-02-13 14:37:05 -06:00
< / ul >
< / div >
2023-02-14 22:03:02 -06:00
< div class = "sub-nav" >
2023-02-13 14:37:05 -06:00
< div >
2023-02-14 22:03:02 -06:00
< ul class = "sub-nav-list" >
2023-02-13 14:37:05 -06:00
< li > Summary: < / li >
< li > Nested | < / li >
2023-02-14 22:03:02 -06:00
< li > < a href = "#field-summary" > Field< / a > | < / li >
< li > < a href = "#constructor-summary" > Constr< / a > | < / li >
< li > < a href = "#method-summary" > Method< / a > < / li >
2023-02-13 14:37:05 -06:00
< / ul >
2023-02-14 22:03:02 -06:00
< ul class = "sub-nav-list" >
2023-02-13 14:37:05 -06:00
< li > Detail: < / li >
2023-02-14 22:03:02 -06:00
< li > < a href = "#field-detail" > Field< / a > | < / li >
< li > < a href = "#constructor-detail" > Constr< / a > | < / li >
< li > < a href = "#method-detail" > Method< / a > < / li >
2023-02-13 14:37:05 -06:00
< / ul >
< / div >
2023-02-14 22:03:02 -06:00
< 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" >
2023-02-13 14:37:05 -06:00
< / div >
2023-02-14 22:03:02 -06:00
< / div >
<!-- ========= END OF TOP NAVBAR ========= -->
< span class = "skip-nav" id = "skip-navbar-top" > < / span > < / nav >
2023-02-13 14:37:05 -06:00
< / header >
2023-02-14 22:03:02 -06:00
< div class = "flex-content" >
2023-02-13 14:37:05 -06:00
< main role = "main" >
2023-02-14 22:03:02 -06:00
<!-- ======== START OF CLASS DATA ======== -->
2023-02-13 14:37:05 -06:00
< div class = "header" >
2023-02-14 22:03:02 -06:00
< div class = "sub-title" > < span class = "package-label-in-type" > Package< / span > < a href = "package-summary.html" > swervelib< / a > < / div >
< h1 title = "Class SwerveModule" class = "title" > Class SwerveModule< / h1 >
2023-02-13 14:37:05 -06:00
< / div >
2023-02-14 22:03:02 -06:00
< 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.SwerveModule< / div >
< / div >
< section class = "class-description" id = "class-description" >
2023-02-13 14:37:05 -06:00
< hr >
2023-02-14 22:03:02 -06:00
< div class = "type-signature" > < span class = "modifiers" > public class < / span > < span class = "element-name type-name-label" > SwerveModule< / 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 >
2023-02-13 14:37:05 -06:00
< div class = "block" > The Swerve Module class which represents and controls Swerve Modules for the swerve drive.< / div >
2023-02-14 22:03:02 -06:00
< / section >
< section class = "summary" >
< ul class = "summary-list" >
2023-02-13 14:37:05 -06:00
<!-- =========== FIELD SUMMARY =========== -->
2023-02-14 22:03:02 -06:00
< 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 >
2024-01-15 14:39:17 -06:00
< div class = "col-first even-row-color" > < code > private final < a href = "encoders/SwerveAbsoluteEncoder.html" title = "class in swervelib.encoders" > SwerveAbsoluteEncoder< / a > < / code > < / div >
< div class = "col-second even-row-color" > < code > < a href = "#absoluteEncoder" class = "member-name-link" > absoluteEncoder< / a > < / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last even-row-color" >
2024-01-15 14:39:17 -06:00
< div class = "block" > Absolute encoder for swerve drive.< / div >
< / div >
< div class = "col-first odd-row-color" > < code > private final < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > SwerveMotor< / a > < / code > < / div >
< div class = "col-second odd-row-color" > < code > < a href = "#angleMotor" class = "member-name-link" > angleMotor< / a > < / code > < / div >
< div class = "col-last odd-row-color" >
< div class = "block" > Swerve Motors.< / div >
< / div >
< div class = "col-first even-row-color" > < code > private double< / code > < / div >
< div class = "col-second even-row-color" > < code > < a href = "#angleOffset" class = "member-name-link" > angleOffset< / a > < / code > < / div >
< div class = "col-last even-row-color" >
< div class = "block" > Angle offset from the absolute encoder.< / div >
< / div >
< div class = "col-first odd-row-color" > < code > final < a href = "parser/SwerveModuleConfiguration.html" title = "class in swervelib.parser" > SwerveModuleConfiguration< / a > < / code > < / div >
< div class = "col-second odd-row-color" > < code > < a href = "#configuration" class = "member-name-link" > configuration< / a > < / code > < / div >
< div class = "col-last odd-row-color" >
2023-02-15 22:18:27 -06:00
< div class = "block" > Swerve module configuration options.< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-15 14:39:17 -06:00
< div class = "col-first even-row-color" > < code > private final < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > SwerveMotor< / a > < / code > < / div >
< div class = "col-second even-row-color" > < code > < a href = "#driveMotor" class = "member-name-link" > driveMotor< / a > < / code > < / div >
< div class = "col-last even-row-color" >
< div class = "block" > Swerve Motors.< / div >
< / div >
2024-01-17 09:18:38 -06:00
< div class = "col-first odd-row-color" > < code > private final < a href = "telemetry/Alert.html" title = "class in swervelib.telemetry" > Alert< / a > < / code > < / div >
< div class = "col-second odd-row-color" > < code > < a href = "#encoderOffsetWarning" class = "member-name-link" > encoderOffsetWarning< / a > < / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last odd-row-color" >
2024-01-17 09:18:38 -06:00
< div class = "block" > An < a href = "telemetry/Alert.html" title = "class in swervelib.telemetry" > < code > Alert< / code > < / a > for if pushing the Absolute Encoder offset to the encoder fails.< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-17 09:18:38 -06:00
< div class = "col-first even-row-color" > < code > edu.wpi.first.math.controller.SimpleMotorFeedforward< / code > < / div >
< div class = "col-second even-row-color" > < code > < a href = "#feedforward" class = "member-name-link" > feedforward< / a > < / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last even-row-color" >
2024-01-17 09:18:38 -06:00
< div class = "block" > Feedforward for drive motor during closed loop control.< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-17 09:18:38 -06:00
< div class = "col-first odd-row-color" > < code > edu.wpi.first.math.kinematics.SwerveModuleState< / code > < / div >
< div class = "col-second odd-row-color" > < code > < a href = "#lastState" class = "member-name-link" > lastState< / a > < / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last odd-row-color" >
2024-01-17 09:18:38 -06:00
< div class = "block" > Last swerve module state applied.< / div >
2023-03-08 23:34:33 -06:00
< / div >
2024-01-17 09:18:38 -06:00
< div class = "col-first even-row-color" > < code > double< / code > < / div >
< div class = "col-second even-row-color" > < code > < a href = "#maxSpeed" class = "member-name-link" > maxSpeed< / a > < / code > < / div >
2023-03-29 07:24:24 -05:00
< div class = "col-last even-row-color" >
2024-01-17 09:18:38 -06:00
< div class = "block" > Maximum speed of the drive motors in meters per second.< / div >
< / div >
< div class = "col-first odd-row-color" > < code > int< / code > < / div >
< div class = "col-second odd-row-color" > < code > < a href = "#moduleNumber" class = "member-name-link" > moduleNumber< / a > < / code > < / div >
< div class = "col-last odd-row-color" >
2023-11-09 18:54:46 -06:00
< div class = "block" > Module number for kinematics, usually 0 to 3.< / div >
< / div >
2024-01-17 09:18:38 -06:00
< div class = "col-first even-row-color" > < code > private final < a href = "telemetry/Alert.html" title = "class in swervelib.telemetry" > Alert< / a > < / code > < / div >
< div class = "col-second even-row-color" > < code > < a href = "#noEncoderWarning" class = "member-name-link" > noEncoderWarning< / a > < / code > < / div >
< div class = "col-last even-row-color" >
< div class = "block" > An < a href = "telemetry/Alert.html" title = "class in swervelib.telemetry" > < code > Alert< / code > < / a > for if there is no Absolute Encoder on the module.< / div >
< / div >
2024-01-15 14:39:17 -06:00
< div class = "col-first odd-row-color" > < code > private < a href = "simulation/SwerveModuleSimulation.html" title = "class in swervelib.simulation" > SwerveModuleSimulation< / a > < / code > < / div >
< div class = "col-second odd-row-color" > < code > < a href = "#simModule" class = "member-name-link" > simModule< / a > < / code > < / div >
< div class = "col-last odd-row-color" >
< div class = "block" > Simulated swerve module.< / div >
< / div >
< div class = "col-first even-row-color" > < code > private boolean< / code > < / div >
< div class = "col-second even-row-color" > < code > < a href = "#synchronizeEncoderQueued" class = "member-name-link" > synchronizeEncoderQueued< / a > < / code > < / div >
< div class = "col-last even-row-color" >
< div class = "block" > Encoder synchronization queued.< / div >
< / div >
2023-02-14 22:03:02 -06:00
< / div >
2023-02-13 14:37:05 -06:00
< / section >
2023-02-14 22:03:02 -06:00
< / li >
2023-02-13 14:37:05 -06:00
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
2023-02-14 22:03:02 -06:00
< 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 >
2023-11-09 18:54:46 -06:00
< div class = "col-constructor-name even-row-color" > < code > < a href = "#%3Cinit%3E(int,swervelib.parser.SwerveModuleConfiguration,edu.wpi.first.math.controller.SimpleMotorFeedforward)" class = "member-name-link" > SwerveModule< / a > < wbr > (int moduleNumber,
< a href = "parser/SwerveModuleConfiguration.html" title = "class in swervelib.parser" > SwerveModuleConfiguration< / a > moduleConfiguration,
edu.wpi.first.math.controller.SimpleMotorFeedforward driveFeedforward)< / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last even-row-color" >
2023-02-13 14:37:05 -06:00
< div class = "block" > Construct the swerve module and initialize the swerve module motors and absolute encoder.< / div >
2023-02-14 22:03:02 -06:00
< / div >
< / div >
2023-02-13 14:37:05 -06:00
< / section >
2023-02-14 22:03:02 -06:00
< / li >
2023-02-13 14:37:05 -06:00
<!-- ========== METHOD SUMMARY =========== -->
2023-02-14 22:03:02 -06:00
< 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-tab4" role = "tab" aria-selected = "false" aria-controls = "method-summary-table.tabpanel" tabindex = "-1" onkeydown = "switchTab(event)" onclick = "show('method-summary-table', 'method-summary-table-tab4', 3)" class = "table-tab" > Concrete 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 >
2024-01-18 12:09:37 -06:00
< div class = "col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "encoders/SwerveAbsoluteEncoder.html" title = "class in swervelib.encoders" > SwerveAbsoluteEncoder< / a > < / code > < / div >
< div class = "col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#getAbsoluteEncoder()" class = "member-name-link" > getAbsoluteEncoder< / a > ()< / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Get the < a href = "encoders/SwerveAbsoluteEncoder.html" title = "class in swervelib.encoders" > < code > SwerveAbsoluteEncoder< / code > < / a > for the < a href = "SwerveModule.html" title = "class in swervelib" > < code > SwerveModule< / code > < / a > .< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-18 12:09:37 -06:00
< 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 = "#getAbsoluteEncoderReadIssue()" class = "member-name-link" > getAbsoluteEncoderReadIssue< / a > ()< / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Get if the last Absolute Encoder had a read issue, such as it does not exist.< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-18 12:09:37 -06:00
< 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 = "#getAbsolutePosition()" class = "member-name-link" > getAbsolutePosition< / a > ()< / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Get the absolute position.< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-18 12:09:37 -06:00
< div class = "col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "motors/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 = "#getAngleMotor()" class = "member-name-link" > getAngleMotor< / a > ()< / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Get the angle < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > < code > SwerveMotor< / code > < / a > for the < a href = "SwerveModule.html" title = "class in swervelib" > < code > SwerveModule< / code > < / a > .< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-18 12:09:37 -06:00
< div class = "col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "parser/SwerveModuleConfiguration.html" title = "class in swervelib.parser" > SwerveModuleConfiguration< / a > < / code > < / div >
< div class = "col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#getConfiguration()" class = "member-name-link" > getConfiguration< / a > ()< / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Fetch the < a href = "parser/SwerveModuleConfiguration.html" title = "class in swervelib.parser" > < code > SwerveModuleConfiguration< / code > < / a > for the < a href = "SwerveModule.html" title = "class in swervelib" > < code > SwerveModule< / code > < / a > with the parsed configurations.< / div >
2023-03-20 19:20:26 -05:00
< / div >
2024-01-18 12:09:37 -06:00
< div class = "col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "motors/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 = "#getDriveMotor()" class = "member-name-link" > getDriveMotor< / a > ()< / code > < / div >
2023-03-20 19:20:26 -05:00
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Get the drive < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > < code > SwerveMotor< / code > < / a > for the < a href = "SwerveModule.html" title = "class in swervelib" > < code > SwerveModule< / code > < / a > .< / div >
2023-03-20 19:20:26 -05:00
< / div >
2024-01-18 12:09:37 -06:00
< div class = "col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > edu.wpi.first.math.kinematics.SwerveModulePosition< / 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 >
2023-03-20 19:20:26 -05:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Get the position of the swerve module.< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-18 12:09:37 -06:00
< 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 = "#getRelativePosition()" class = "member-name-link" > getRelativePosition< / a > ()< / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Get the relative angle in degrees.< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-18 12:09:37 -06:00
< div class = "col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > edu.wpi.first.math.kinematics.SwerveModuleState< / code > < / div >
< div class = "col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#getState()" class = "member-name-link" > getState< / a > ()< / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Get the Swerve Module state.< / div >
2023-12-12 10:48:54 -06:00
< / div >
< div class = "col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#pushOffsetsToControllers()" class = "member-name-link" > pushOffsetsToControllers< / a > ()< / code > < / div >
2023-12-12 10:48:54 -06:00
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Push absolute encoder offset in the memory of the encoder or controller.< / div >
2023-02-14 22:03:02 -06:00
< / div >
2023-12-12 10:48:54 -06:00
< div class = "col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#queueSynchronizeEncoders()" class = "member-name-link" > queueSynchronizeEncoders< / a > ()< / code > < / div >
2023-12-12 10:48:54 -06:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Queue synchronization of the integrated angle encoder with the absolute encoder.< / div >
2023-12-12 10:48:54 -06:00
< / div >
2023-02-14 22:03:02 -06:00
< div class = "col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#restoreInternalOffset()" class = "member-name-link" > restoreInternalOffset< / a > ()< / code > < / div >
2023-11-09 18:54:46 -06:00
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Restore internal offset in YAGSL and either sets absolute encoder offset to 0 or restores old value.< / div >
2023-11-09 18:54:46 -06:00
< / div >
< div class = "col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#setAngle(double)" class = "member-name-link" > setAngle< / a > < wbr > (double angle)< / code > < / div >
2023-11-09 18:54:46 -06:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Set the angle for the module.< / div >
2023-11-09 18:54:46 -06:00
< / div >
< div class = "col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#setAngleMotorConversionFactor(double)" class = "member-name-link" > setAngleMotorConversionFactor< / a > < wbr > (double conversionFactor)< / code > < / div >
2023-02-14 22:03:02 -06:00
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Set the conversion factor for the angle/azimuth motor controller.< / div >
2023-03-20 19:20:26 -05:00
< / div >
< div class = "col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#setAngleMotorVoltageCompensation(double)" class = "member-name-link" > setAngleMotorVoltageCompensation< / a > < wbr > (double optimalVoltage)< / code > < / div >
2023-11-09 18:54:46 -06:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Set the voltage compensation for the swerve module motor.< / div >
2023-11-09 18:54:46 -06:00
< / div >
< div class = "col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#setDesiredState(edu.wpi.first.math.kinematics.SwerveModuleState,boolean,boolean)" class = "member-name-link" > setDesiredState< / a > < wbr > (edu.wpi.first.math.kinematics.SwerveModuleState desiredState,
boolean isOpenLoop,
boolean force)< / code > < / div >
2023-11-09 18:54:46 -06:00
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Set the desired state of the swerve module.< / div >
2023-11-09 18:54:46 -06:00
< / div >
< div class = "col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#setDriveMotorConversionFactor(double)" class = "member-name-link" > setDriveMotorConversionFactor< / a > < wbr > (double conversionFactor)< / code > < / div >
2023-03-20 19:20:26 -05:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Set the conversion factor for the drive motor controller.< / div >
2023-11-29 17:36:08 -06:00
< / div >
< div class = "col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#setDriveMotorVoltageCompensation(double)" class = "member-name-link" > setDriveMotorVoltageCompensation< / a > < wbr > (double optimalVoltage)< / code > < / div >
2023-11-29 17:36:08 -06:00
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Set the voltage compensation for the swerve module motor.< / div >
2023-02-14 22:03:02 -06:00
< / div >
2024-01-15 14:37:13 -06:00
< div class = "col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > void< / code > < / div >
2024-01-18 12:09:37 -06:00
< div class = "col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" > < code > < a href = "#setMotorBrake(boolean)" class = "member-name-link" > setMotorBrake< / a > < wbr > (boolean brake)< / code > < / div >
2024-01-15 14:37:13 -06:00
< div class = "col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-18 12:09:37 -06:00
< div class = "block" > Set the brake mode.< / 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 = "#updateTelemetry()" class = "member-name-link" > updateTelemetry< / a > ()< / code > < / div >
< div class = "col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4" >
2024-01-15 14:37:13 -06:00
< div class = "block" > Update data sent to < code > SmartDashboard< / code > .< / div >
< / div >
2023-02-14 22:03:02 -06:00
< / div >
< / div >
< / div >
< div class = "inherited-list" >
< h3 id = "methods-inherited-from-class-java.lang.Object" > Methods inherited from class 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 >
2023-02-13 14:37:05 -06:00
< / section >
< / li >
< / ul >
2023-02-14 22:03:02 -06:00
< / section >
< section class = "details" >
< ul class = "details-list" >
2023-02-13 14:37:05 -06:00
<!-- ============ FIELD DETAIL =========== -->
2023-02-14 22:03:02 -06:00
< li >
< section class = "field-details" id = "field-detail" >
< h2 > Field Details< / h2 >
< ul class = "member-list" >
< li >
< section class = "detail" id = "configuration" >
< h3 > configuration< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public final< / span > < span class = "return-type" > < a href = "parser/SwerveModuleConfiguration.html" title = "class in swervelib.parser" > SwerveModuleConfiguration< / a > < / span > < span class = "element-name" > configuration< / span > < / div >
2023-02-13 14:37:05 -06:00
< div class = "block" > Swerve module configuration options.< / div >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
2024-01-15 14:39:17 -06:00
< section class = "detail" id = "angleMotor" >
< h3 > angleMotor< / h3 >
< div class = "member-signature" > < span class = "modifiers" > private final< / span > < span class = "return-type" > < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > SwerveMotor< / a > < / span > < span class = "element-name" > angleMotor< / span > < / div >
< div class = "block" > Swerve Motors.< / div >
< / section >
< / li >
< li >
< section class = "detail" id = "driveMotor" >
< h3 > driveMotor< / h3 >
< div class = "member-signature" > < span class = "modifiers" > private final< / span > < span class = "return-type" > < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > SwerveMotor< / a > < / span > < span class = "element-name" > driveMotor< / span > < / div >
< div class = "block" > Swerve Motors.< / div >
< / section >
< / li >
< li >
< section class = "detail" id = "absoluteEncoder" >
< h3 > absoluteEncoder< / h3 >
< div class = "member-signature" > < span class = "modifiers" > private final< / span > < span class = "return-type" > < a href = "encoders/SwerveAbsoluteEncoder.html" title = "class in swervelib.encoders" > SwerveAbsoluteEncoder< / a > < / span > < span class = "element-name" > absoluteEncoder< / span > < / div >
< div class = "block" > Absolute encoder for swerve drive.< / div >
< / section >
< / li >
< li >
2024-01-17 09:18:38 -06:00
< section class = "detail" id = "encoderOffsetWarning" >
< h3 > encoderOffsetWarning< / h3 >
< div class = "member-signature" > < span class = "modifiers" > private final< / span > < span class = "return-type" > < a href = "telemetry/Alert.html" title = "class in swervelib.telemetry" > Alert< / a > < / span > < span class = "element-name" > encoderOffsetWarning< / span > < / div >
< div class = "block" > An < a href = "telemetry/Alert.html" title = "class in swervelib.telemetry" > < code > Alert< / code > < / a > for if pushing the Absolute Encoder offset to the encoder fails.< / div >
< / section >
< / li >
< li >
< section class = "detail" id = "noEncoderWarning" >
< h3 > noEncoderWarning< / h3 >
< div class = "member-signature" > < span class = "modifiers" > private final< / span > < span class = "return-type" > < a href = "telemetry/Alert.html" title = "class in swervelib.telemetry" > Alert< / a > < / span > < span class = "element-name" > noEncoderWarning< / span > < / div >
< div class = "block" > An < a href = "telemetry/Alert.html" title = "class in swervelib.telemetry" > < code > Alert< / code > < / a > for if there is no Absolute Encoder on the module.< / div >
< / section >
< / li >
< li >
2023-02-14 22:03:02 -06:00
< section class = "detail" id = "moduleNumber" >
< h3 > moduleNumber< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > int< / span > < span class = "element-name" > moduleNumber< / span > < / div >
2023-08-29 19:59:07 -05:00
< div class = "block" > Module number for kinematics, usually 0 to 3. front left -> front right -> back left -> back right.< / div >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
< section class = "detail" id = "feedforward" >
< h3 > feedforward< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > edu.wpi.first.math.controller.SimpleMotorFeedforward< / span > < span class = "element-name" > feedforward< / span > < / div >
2023-02-13 14:37:05 -06:00
< div class = "block" > Feedforward for drive motor during closed loop control.< / div >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
2023-11-09 18:54:46 -06:00
< section class = "detail" id = "maxSpeed" >
< h3 > maxSpeed< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > double< / span > < span class = "element-name" > maxSpeed< / span > < / div >
< div class = "block" > Maximum speed of the drive motors in meters per second.< / div >
< / section >
< / li >
< li >
2023-03-29 07:24:24 -05:00
< section class = "detail" id = "lastState" >
< h3 > lastState< / h3 >
2023-08-29 21:03:58 -05:00
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > edu.wpi.first.math.kinematics.SwerveModuleState< / span > < span class = "element-name" > lastState< / span > < / div >
2023-03-29 07:24:24 -05:00
< div class = "block" > Last swerve module state applied.< / div >
2023-03-08 23:34:33 -06:00
< / section >
< / li >
2024-01-15 14:39:17 -06:00
< li >
< section class = "detail" id = "angleOffset" >
< h3 > angleOffset< / h3 >
< div class = "member-signature" > < span class = "modifiers" > private< / span > < span class = "return-type" > double< / span > < span class = "element-name" > angleOffset< / span > < / div >
< div class = "block" > Angle offset from the absolute encoder.< / div >
< / section >
< / li >
< li >
< section class = "detail" id = "simModule" >
< h3 > simModule< / h3 >
< div class = "member-signature" > < span class = "modifiers" > private< / span > < span class = "return-type" > < a href = "simulation/SwerveModuleSimulation.html" title = "class in swervelib.simulation" > SwerveModuleSimulation< / a > < / span > < span class = "element-name" > simModule< / span > < / div >
< div class = "block" > Simulated swerve module.< / div >
< / section >
< / li >
< li >
< section class = "detail" id = "synchronizeEncoderQueued" >
< h3 > synchronizeEncoderQueued< / h3 >
< div class = "member-signature" > < span class = "modifiers" > private< / span > < span class = "return-type" > boolean< / span > < span class = "element-name" > synchronizeEncoderQueued< / span > < / div >
< div class = "block" > Encoder synchronization queued.< / div >
< / section >
< / li >
2023-02-13 14:37:05 -06:00
< / ul >
< / section >
2023-02-14 22:03:02 -06:00
< / li >
2023-02-13 14:37:05 -06:00
<!-- ========= CONSTRUCTOR DETAIL ======== -->
2023-02-14 22:03:02 -06:00
< li >
< section class = "constructor-details" id = "constructor-detail" >
< h2 > Constructor Details< / h2 >
< ul class = "member-list" >
< li >
2023-11-09 18:54:46 -06:00
< section class = "detail" id = "<init>(int,swervelib.parser.SwerveModuleConfiguration,edu.wpi.first.math.controller.SimpleMotorFeedforward)" >
2023-02-14 22:03:02 -06:00
< h3 > SwerveModule< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "element-name" > SwerveModule< / span > < wbr > < span class = "parameters" > (int moduleNumber,
2023-11-09 18:54:46 -06:00
< a href = "parser/SwerveModuleConfiguration.html" title = "class in swervelib.parser" > SwerveModuleConfiguration< / a > moduleConfiguration,
edu.wpi.first.math.controller.SimpleMotorFeedforward driveFeedforward)< / span > < / div >
2023-02-13 14:37:05 -06:00
< div class = "block" > Construct the swerve module and initialize the swerve module motors and absolute encoder.< / div >
2023-02-14 22:03:02 -06:00
< dl class = "notes" >
< dt > Parameters:< / dt >
2023-02-13 14:37:05 -06:00
< dd > < code > moduleNumber< / code > - Module number for kinematics.< / dd >
< dd > < code > moduleConfiguration< / code > - Module constants containing CAN ID's and offsets.< / dd >
2023-11-09 18:54:46 -06:00
< dd > < code > driveFeedforward< / code > - Drive motor feedforward created by
< a href = "math/SwerveMath.html#createDriveFeedforward(double,double,double)" > < code > SwerveMath.createDriveFeedforward(double, double, double)< / code > < / a > .< / dd >
2023-02-13 14:37:05 -06:00
< / dl >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
< / ul >
< / section >
2023-02-14 22:03:02 -06:00
< / li >
2023-02-13 14:37:05 -06:00
<!-- ============ METHOD DETAIL ========== -->
2023-02-14 22:03:02 -06:00
< li >
< section class = "method-details" id = "method-detail" >
< h2 > Method Details< / h2 >
< ul class = "member-list" >
< li >
2023-11-09 18:54:46 -06:00
< section class = "detail" id = "setAngleMotorVoltageCompensation(double)" >
< h3 > setAngleMotorVoltageCompensation< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > setAngleMotorVoltageCompensation< / span > < wbr > < span class = "parameters" > (double optimalVoltage)< / span > < / div >
< div class = "block" > Set the voltage compensation for the swerve module motor.< / div >
< dl class = "notes" >
< dt > Parameters:< / dt >
< dd > < code > optimalVoltage< / code > - Nominal voltage for operation to output to.< / dd >
< / dl >
< / section >
< / li >
< li >
< section class = "detail" id = "setDriveMotorVoltageCompensation(double)" >
< h3 > setDriveMotorVoltageCompensation< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > setDriveMotorVoltageCompensation< / span > < wbr > < span class = "parameters" > (double optimalVoltage)< / span > < / div >
< div class = "block" > Set the voltage compensation for the swerve module motor.< / div >
< dl class = "notes" >
< dt > Parameters:< / dt >
< dd > < code > optimalVoltage< / code > - Nominal voltage for operation to output to.< / dd >
< / dl >
< / section >
< / li >
< li >
2023-03-15 21:49:24 -05:00
< section class = "detail" id = "queueSynchronizeEncoders()" >
< h3 > queueSynchronizeEncoders< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > queueSynchronizeEncoders< / span > ()< / div >
< div class = "block" > Queue synchronization of the integrated angle encoder with the absolute encoder.< / div >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
2023-08-29 21:03:58 -05:00
< section class = "detail" id = "setDesiredState(edu.wpi.first.math.kinematics.SwerveModuleState,boolean,boolean)" >
2023-02-14 22:03:02 -06:00
< h3 > setDesiredState< / h3 >
2023-08-29 21:03:58 -05:00
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > setDesiredState< / span > < wbr > < span class = "parameters" > (edu.wpi.first.math.kinematics.SwerveModuleState desiredState,
2023-03-09 21:48:47 -06:00
boolean isOpenLoop,
boolean force)< / span > < / div >
2023-08-29 19:59:07 -05:00
< div class = "block" > Set the desired state of the swerve module. < br / > < b > WARNING: If you are not using one of the functions from
< a href = "SwerveDrive.html" title = "class in swervelib" > < code > SwerveDrive< / code > < / a > you may screw up < a href = "SwerveDrive.html#kinematics" > < code > SwerveDrive.kinematics< / code > < / a > < / b > < / div >
2023-02-14 22:03:02 -06:00
< dl class = "notes" >
< dt > Parameters:< / dt >
2023-02-13 14:37:05 -06:00
< dd > < code > desiredState< / code > - Desired swerve module state.< / dd >
< dd > < code > isOpenLoop< / code > - Whether to use open loop (direct percent) or direct velocity control.< / dd >
2023-08-29 19:59:07 -05:00
< dd > < code > force< / code > - Disables optimizations that prevent movement in the angle motor and forces the desired state
onto the swerve module.< / dd >
2023-02-13 14:37:05 -06:00
< / dl >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
< section class = "detail" id = "setAngle(double)" >
< h3 > setAngle< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > setAngle< / span > < wbr > < span class = "parameters" > (double angle)< / span > < / div >
2023-02-13 14:37:05 -06:00
< div class = "block" > Set the angle for the module.< / div >
2023-02-14 22:03:02 -06:00
< dl class = "notes" >
< dt > Parameters:< / dt >
2023-02-13 14:37:05 -06:00
< dd > < code > angle< / code > - Angle in degrees.< / dd >
< / dl >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
< section class = "detail" id = "getState()" >
< h3 > getState< / h3 >
2023-08-29 21:03:58 -05:00
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > edu.wpi.first.math.kinematics.SwerveModuleState< / span > < span class = "element-name" > getState< / span > ()< / div >
2023-02-13 14:37:05 -06:00
< div class = "block" > Get the Swerve Module state.< / div >
2023-02-14 22:03:02 -06:00
< dl class = "notes" >
< dt > Returns:< / dt >
2023-02-13 14:37:05 -06:00
< dd > Current SwerveModule state.< / dd >
< / dl >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
< section class = "detail" id = "getPosition()" >
< h3 > getPosition< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > edu.wpi.first.math.kinematics.SwerveModulePosition< / span > < span class = "element-name" > getPosition< / span > ()< / div >
< div class = "block" > Get the position of the swerve module.< / div >
< dl class = "notes" >
< dt > Returns:< / dt >
< dd > < code > SwerveModulePosition< / code > of the swerve module.< / dd >
< / dl >
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
2023-02-14 22:58:34 -06:00
< section class = "detail" id = "getAbsolutePosition()" >
< h3 > getAbsolutePosition< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > double< / span > < span class = "element-name" > getAbsolutePosition< / span > ()< / div >
2023-02-21 22:38:14 -06:00
< div class = "block" > Get the absolute position. Falls back to relative position on reading failure.< / div >
2023-02-14 22:03:02 -06:00
< dl class = "notes" >
< dt > Returns:< / dt >
2023-03-15 21:49:24 -05:00
< dd > Absolute encoder angle in degrees in the range [0, 360).< / dd >
2023-02-13 14:37:05 -06:00
< / dl >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
2023-02-14 22:58:34 -06:00
< section class = "detail" id = "getRelativePosition()" >
< h3 > getRelativePosition< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > double< / span > < span class = "element-name" > getRelativePosition< / span > ()< / div >
< div class = "block" > Get the relative angle in degrees.< / div >
2023-02-14 22:03:02 -06:00
< dl class = "notes" >
< dt > Returns:< / dt >
2023-02-13 14:37:05 -06:00
< dd > Angle in degrees.< / dd >
< / dl >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-02-14 22:03:02 -06:00
< li >
< section class = "detail" id = "setMotorBrake(boolean)" >
< h3 > setMotorBrake< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > setMotorBrake< / span > < wbr > < span class = "parameters" > (boolean brake)< / span > < / div >
2023-02-13 14:37:05 -06:00
< div class = "block" > Set the brake mode.< / div >
2023-02-14 22:03:02 -06:00
< dl class = "notes" >
< dt > Parameters:< / dt >
2023-02-13 14:37:05 -06:00
< dd > < code > brake< / code > - Set the brake mode.< / dd >
< / dl >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
< / li >
2023-03-20 19:20:26 -05:00
< li >
2023-11-09 18:54:46 -06:00
< section class = "detail" id = "setAngleMotorConversionFactor(double)" >
< h3 > setAngleMotorConversionFactor< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > setAngleMotorConversionFactor< / span > < wbr > < span class = "parameters" > (double conversionFactor)< / span > < / div >
< div class = "block" > Set the conversion factor for the angle/azimuth motor controller.< / div >
< dl class = "notes" >
< dt > Parameters:< / dt >
< dd > < code > conversionFactor< / code > - Angle motor conversion factor for PID, should be generated from
< a href = "math/SwerveMath.html#calculateDegreesPerSteeringRotation(double,double)" > < code > SwerveMath.calculateDegreesPerSteeringRotation(double, double)< / code > < / a > or calculated.< / dd >
< / dl >
< / section >
< / li >
< li >
< section class = "detail" id = "setDriveMotorConversionFactor(double)" >
< h3 > setDriveMotorConversionFactor< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > setDriveMotorConversionFactor< / span > < wbr > < span class = "parameters" > (double conversionFactor)< / span > < / div >
< div class = "block" > Set the conversion factor for the drive motor controller.< / div >
< dl class = "notes" >
< dt > Parameters:< / dt >
< dd > < code > conversionFactor< / code > - Drive motor conversion factor for PID, should be generated from
< a href = "math/SwerveMath.html#calculateMetersPerRotation(double,double,double)" > < code > SwerveMath.calculateMetersPerRotation(double, double, double)< / code > < / a > or calculated.< / dd >
< / dl >
< / section >
< / li >
< li >
2023-03-20 19:20:26 -05:00
< section class = "detail" id = "getAngleMotor()" >
< h3 > getAngleMotor< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > SwerveMotor< / a > < / span > < span class = "element-name" > getAngleMotor< / span > ()< / div >
< div class = "block" > Get the angle < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > < code > SwerveMotor< / code > < / a > for the < a href = "SwerveModule.html" title = "class in swervelib" > < code > SwerveModule< / code > < / a > .< / div >
< dl class = "notes" >
< dt > Returns:< / dt >
< dd > < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > < code > SwerveMotor< / code > < / a > for the angle/steering motor of the module.< / dd >
< / dl >
< / section >
< / li >
< li >
< section class = "detail" id = "getDriveMotor()" >
< h3 > getDriveMotor< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > SwerveMotor< / a > < / span > < span class = "element-name" > getDriveMotor< / span > ()< / div >
< div class = "block" > Get the drive < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > < code > SwerveMotor< / code > < / a > for the < a href = "SwerveModule.html" title = "class in swervelib" > < code > SwerveModule< / code > < / a > .< / div >
< dl class = "notes" >
< dt > Returns:< / dt >
< dd > < a href = "motors/SwerveMotor.html" title = "class in swervelib.motors" > < code > SwerveMotor< / code > < / a > for the drive motor of the module.< / dd >
< / dl >
< / section >
< / li >
< li >
2024-01-18 12:09:37 -06:00
< section class = "detail" id = "getAbsoluteEncoder()" >
< h3 > getAbsoluteEncoder< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > < a href = "encoders/SwerveAbsoluteEncoder.html" title = "class in swervelib.encoders" > SwerveAbsoluteEncoder< / a > < / span > < span class = "element-name" > getAbsoluteEncoder< / span > ()< / div >
< div class = "block" > Get the < a href = "encoders/SwerveAbsoluteEncoder.html" title = "class in swervelib.encoders" > < code > SwerveAbsoluteEncoder< / code > < / a > for the < a href = "SwerveModule.html" title = "class in swervelib" > < code > SwerveModule< / code > < / a > .< / div >
< dl class = "notes" >
< dt > Returns:< / dt >
< dd > < a href = "encoders/SwerveAbsoluteEncoder.html" title = "class in swervelib.encoders" > < code > SwerveAbsoluteEncoder< / code > < / a > for the swerve module.< / dd >
< / dl >
< / section >
< / li >
< li >
2023-03-20 19:20:26 -05:00
< section class = "detail" id = "getConfiguration()" >
< h3 > getConfiguration< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > < a href = "parser/SwerveModuleConfiguration.html" title = "class in swervelib.parser" > SwerveModuleConfiguration< / a > < / span > < span class = "element-name" > getConfiguration< / span > ()< / div >
2023-08-29 19:59:07 -05:00
< div class = "block" > Fetch the < a href = "parser/SwerveModuleConfiguration.html" title = "class in swervelib.parser" > < code > SwerveModuleConfiguration< / code > < / a > for the < a href = "SwerveModule.html" title = "class in swervelib" > < code > SwerveModule< / code > < / a > with the parsed configurations.< / div >
2023-03-20 19:20:26 -05:00
< dl class = "notes" >
< dt > Returns:< / dt >
< dd > < a href = "parser/SwerveModuleConfiguration.html" title = "class in swervelib.parser" > < code > SwerveModuleConfiguration< / code > < / a > for the < a href = "SwerveModule.html" title = "class in swervelib" > < code > SwerveModule< / code > < / a > .< / dd >
< / dl >
< / section >
< / li >
2023-11-29 17:36:08 -06:00
< li >
2023-12-12 10:48:54 -06:00
< section class = "detail" id = "pushOffsetsToControllers()" >
< h3 > pushOffsetsToControllers< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > pushOffsetsToControllers< / span > ()< / div >
< div class = "block" > Push absolute encoder offset in the memory of the encoder or controller. Also removes the internal angle offset.< / div >
< / section >
< / li >
< li >
< section class = "detail" id = "restoreInternalOffset()" >
< h3 > restoreInternalOffset< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > restoreInternalOffset< / span > ()< / div >
< div class = "block" > Restore internal offset in YAGSL and either sets absolute encoder offset to 0 or restores old value.< / div >
< / section >
< / li >
< li >
2023-11-29 17:36:08 -06:00
< section class = "detail" id = "getAbsoluteEncoderReadIssue()" >
< h3 > getAbsoluteEncoderReadIssue< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > boolean< / span > < span class = "element-name" > getAbsoluteEncoderReadIssue< / span > ()< / div >
< div class = "block" > Get if the last Absolute Encoder had a read issue, such as it does not exist.< / div >
< dl class = "notes" >
< dt > Returns:< / dt >
< dd > If the last Absolute Encoder had a read issue, or absolute encoder does not exist.< / dd >
< / dl >
< / section >
< / li >
2024-01-15 14:37:13 -06:00
< li >
< section class = "detail" id = "updateTelemetry()" >
< h3 > updateTelemetry< / h3 >
< div class = "member-signature" > < span class = "modifiers" > public< / span > < span class = "return-type" > void< / span > < span class = "element-name" > updateTelemetry< / span > ()< / div >
< div class = "block" > Update data sent to < code > SmartDashboard< / code > .< / div >
< / section >
< / li >
2023-02-13 14:37:05 -06:00
< / ul >
< / section >
< / li >
< / ul >
2023-02-14 22:03:02 -06:00
< / section >
2023-02-13 14:37:05 -06:00
<!-- ========= END OF CLASS DATA ========= -->
2023-02-14 22:03:02 -06:00
< / main >
2023-02-13 14:37:05 -06:00
< / div >
< / div >
< / body >
< / html >