Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
closed #4
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielseaver9678 committed Feb 19, 2022
1 parent 9ba1e8b commit 70488f4
Show file tree
Hide file tree
Showing 24 changed files with 81 additions and 15 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ <h3>Method Summary</h3>
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;frc.team1711.swerve.subsystems.<a href="GyroSwerveDrive.html" title="class in frc.team1711.swerve.subsystems">GyroSwerveDrive</a></h3>
<code><a href="GyroSwerveDrive.html#fieldRelativeUserInputDrive(double,double,double,frc.team1711.swerve.util.InputHandler)">fieldRelativeUserInputDrive</a>, <a href="GyroSwerveDrive.html#getGyroAngle()">getGyroAngle</a>, <a href="GyroSwerveDrive.html#resetGyro()">resetGyro</a></code></li>
<code><a href="GyroSwerveDrive.html#fieldRelativeUserInputDrive(double,double,double,frc.team1711.swerve.util.InputHandler)">fieldRelativeUserInputDrive</a>, <a href="GyroSwerveDrive.html#getGyroAngle()">getGyroAngle</a>, <a href="GyroSwerveDrive.html#initSendable(edu.wpi.first.util.sendable.SendableBuilder)">initSendable</a>, <a href="GyroSwerveDrive.html#resetGyro()">resetGyro</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.frc.team1711.swerve.subsystems.SwerveDrive">
Expand All @@ -270,7 +270,7 @@ <h3>Methods inherited from class&nbsp;frc.team1711.swerve.subsystems.<a href="Sw
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;edu.wpi.first.wpilibj2.command.SubsystemBase</h3>
<code>addChild, getName, getSubsystem, initSendable, setName, setSubsystem</code></li>
<code>addChild, getName, getSubsystem, setName, setSubsystem</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
catch(err) {
}
//-->
var data = {"i0":10,"i1":6,"i2":6};
var data = {"i0":10,"i1":6,"i2":10,"i3":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
Expand Down Expand Up @@ -252,6 +252,11 @@ <h3>Method Summary</h3>
</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="#initSendable(edu.wpi.first.util.sendable.SendableBuilder)">initSendable</a></span>&#8203;(edu.wpi.first.util.sendable.SendableBuilder&nbsp;builder)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetGyro()">resetGyro</a></span>()</code></th>
<td class="colLast">
Expand All @@ -271,7 +276,7 @@ <h3>Methods inherited from class&nbsp;frc.team1711.swerve.subsystems.<a href="Sw
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;edu.wpi.first.wpilibj2.command.SubsystemBase</h3>
<code>addChild, getName, getSubsystem, initSendable, setName, setSubsystem</code></li>
<code>addChild, getName, getSubsystem, setName, setSubsystem</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
Expand Down Expand Up @@ -364,6 +369,21 @@ <h4>fieldRelativeUserInputDrive</h4>
</dl>
</li>
</ul>
<a id="initSendable(edu.wpi.first.util.sendable.SendableBuilder)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initSendable</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;initSendable&#8203;(edu.wpi.first.util.sendable.SendableBuilder&nbsp;builder)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>initSendable</code>&nbsp;in interface&nbsp;<code>edu.wpi.first.util.sendable.Sendable</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="SwerveDrive.html#initSendable(edu.wpi.first.util.sendable.SendableBuilder)">initSendable</a></code>&nbsp;in class&nbsp;<code><a href="SwerveDrive.html" title="class in frc.team1711.swerve.subsystems">SwerveDrive</a></code></dd>
</dl>
</li>
</ul>
<a id="getGyroAngle()">
<!-- -->
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10};
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
Expand Down Expand Up @@ -255,35 +255,40 @@ <h3>Method Summary</h3>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#initSendable(edu.wpi.first.util.sendable.SendableBuilder)">initSendable</a></span>&#8203;(edu.wpi.first.util.sendable.SendableBuilder&nbsp;builder)</code></th>
<td class="colLast">&nbsp;</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="#setSwerveDrivingSpeeds(frc.team1711.swerve.subsystems.SwerveDrive.SwerveDrivingSpeeds)">setSwerveDrivingSpeeds</a></span>&#8203;(<a href="SwerveDrive.SwerveDrivingSpeeds.html" title="class in frc.team1711.swerve.subsystems">SwerveDrive.SwerveDrivingSpeeds</a>&nbsp;swerveDrivingSpeeds)</code></th>
<td class="colLast">
<div class="block">Used to set a new <a href="SwerveDrive.SwerveDrivingSpeeds.html" title="class in frc.team1711.swerve.subsystems"><code>SwerveDrive.SwerveDrivingSpeeds</code></a> configuration.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#steerAllWithinRange(double,double)">steerAllWithinRange</a></span>&#8203;(double&nbsp;direction,
double&nbsp;marginOfError)</code></th>
<td class="colLast">
<div class="block">Steers all wheels to a direction within a certain range.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#steerAndDriveAll(double,double)">steerAndDriveAll</a></span>&#8203;(double&nbsp;direction,
double&nbsp;speed)</code></th>
<td class="colLast">
<div class="block">Steers and drives all wheels in the same direction and with the same speed.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stop()">stop</a></span>()</code></th>
<td class="colLast">
<div class="block">Stops all modules immediately.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#userInputDrive(double,double,double,frc.team1711.swerve.util.InputHandler)">userInputDrive</a></span>&#8203;(double&nbsp;strafeX,
double&nbsp;strafeY,
Expand All @@ -300,7 +305,7 @@ <h3>Method Summary</h3>
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;edu.wpi.first.wpilibj2.command.SubsystemBase</h3>
<code>addChild, getName, getSubsystem, initSendable, setName, setSubsystem</code></li>
<code>addChild, getName, getSubsystem, setName, setSubsystem</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
Expand Down Expand Up @@ -386,6 +391,21 @@ <h4>SwerveDrive</h4>
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="initSendable(edu.wpi.first.util.sendable.SendableBuilder)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initSendable</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;initSendable&#8203;(edu.wpi.first.util.sendable.SendableBuilder&nbsp;builder)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>initSendable</code>&nbsp;in interface&nbsp;<code>edu.wpi.first.util.sendable.Sendable</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>initSendable</code>&nbsp;in class&nbsp;<code>edu.wpi.first.wpilibj2.command.SubsystemBase</code></dd>
</dl>
</li>
</ul>
<a id="setSwerveDrivingSpeeds(frc.team1711.swerve.subsystems.SwerveDrive.SwerveDrivingSpeeds)">
<!-- -->
</a>
Expand Down
4 changes: 4 additions & 0 deletions swervelib/build/docs/javadoc/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ <h2 class="title">I</h2>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="frc/team1711/swerve/commands/AutonTurn.html#initialize()">initialize()</a></span> - Method in class frc.team1711.swerve.commands.<a href="frc/team1711/swerve/commands/AutonTurn.html" title="class in frc.team1711.swerve.commands">AutonTurn</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="frc/team1711/swerve/subsystems/GyroSwerveDrive.html#initSendable(edu.wpi.first.util.sendable.SendableBuilder)">initSendable(SendableBuilder)</a></span> - Method in class frc.team1711.swerve.subsystems.<a href="frc/team1711/swerve/subsystems/GyroSwerveDrive.html" title="class in frc.team1711.swerve.subsystems">GyroSwerveDrive</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="frc/team1711/swerve/subsystems/SwerveDrive.html#initSendable(edu.wpi.first.util.sendable.SendableBuilder)">initSendable(SendableBuilder)</a></span> - Method in class frc.team1711.swerve.subsystems.<a href="frc/team1711/swerve/subsystems/SwerveDrive.html" title="class in frc.team1711.swerve.subsystems">SwerveDrive</a></dt>
<dd>&nbsp;</dd>
<dt><a href="frc/team1711/swerve/util/InputHandler.html" title="class in frc.team1711.swerve.util"><span class="typeNameLink">InputHandler</span></a> - Class in <a href="frc/team1711/swerve/util/package-summary.html">frc.team1711.swerve.util</a></dt>
<dd>
<div class="block">Represents a system for converting continuous user input into a usable input into robot-control functions.</div>
Expand Down
2 changes: 1 addition & 1 deletion swervelib/build/docs/javadoc/member-search-index.js

Large diffs are not rendered by default.

Binary file modified swervelib/build/docs/javadoc/member-search-index.zip
Binary file not shown.
Binary file modified swervelib/build/docs/javadoc/package-search-index.zip
Binary file not shown.
Binary file modified swervelib/build/docs/javadoc/type-search-index.zip
Binary file not shown.
Binary file modified swervelib/build/libs/swervelib-v3.2022.3.1-javadoc.jar
Binary file not shown.
Binary file modified swervelib/build/libs/swervelib-v3.2022.3.1.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h2>Tests</h2>
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.3.3</a> at Feb 17, 2022, 6:34:16 PM</p>
<a href="http://www.gradle.org">Gradle 7.3.3</a> at Feb 19, 2022, 11:35:47 AM</p>
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion swervelib/build/reports/tests/test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h2>Classes</h2>
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.3.3</a> at Feb 17, 2022, 6:34:16 PM</p>
<a href="http://www.gradle.org">Gradle 7.3.3</a> at Feb 19, 2022, 11:35:47 AM</p>
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion swervelib/build/reports/tests/test/packages/swerve.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h2>Classes</h2>
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.3.3</a> at Feb 17, 2022, 6:34:16 PM</p>
<a href="http://www.gradle.org">Gradle 7.3.3</a> at Feb 19, 2022, 11:35:47 AM</p>
</div>
</div>
</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="swerve.LibraryTest" tests="1" skipped="1" failures="0" errors="0" timestamp="2022-02-17T23:34:16" hostname="GABRIEL-LAPTOP" time="0.0">
<testsuite name="swerve.LibraryTest" tests="1" skipped="1" failures="0" errors="0" timestamp="2022-02-19T16:35:47" hostname="GABRIEL-LAPTOP" time="0.0">
<properties/>
<testcase name="testSomeLibraryMethod" classname="swerve.LibraryTest" time="0.0">
<skipped/>
Expand Down
Binary file modified swervelib/build/test-results/test/binary/results.bin
Binary file not shown.
Binary file modified swervelib/build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

package frc.team1711.swerve.subsystems;

import edu.wpi.first.util.sendable.SendableBuilder;
import frc.team1711.swerve.util.Angles;
import frc.team1711.swerve.util.InputHandler;
import frc.team1711.swerve.util.Vector;
Expand Down Expand Up @@ -61,6 +62,12 @@ public void fieldRelativeUserInputDrive (double strafeX, double strafeY, double
fieldStrafeInput.getY() * swerveDrivingSpeeds.strafeSpeed,
steering * swerveDrivingSpeeds.steerSpeed);
}

@Override
public void initSendable (SendableBuilder builder) {
super.initSendable(builder);
builder.addDoubleProperty("Gyro Angle", () -> getGyroAngle(), (x) -> {});
}

/**
* Gets the gyro yaw angle on the range [0, 360) degrees.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

package frc.team1711.swerve.subsystems;

import edu.wpi.first.util.sendable.SendableBuilder;
import edu.wpi.first.wpilibj2.command.SubsystemBase;

import frc.team1711.swerve.util.InputHandler;
Expand Down Expand Up @@ -78,6 +79,20 @@ public SwerveDrivingSpeeds (double strafeSpeed, double steerSpeed) {

}

@Override
public void initSendable (SendableBuilder builder) {
builder.setSmartDashboardType("Swerve Drive");
builder.addDoubleProperty("Front Left Module", () -> getSendableDir(flWheel), (x) -> {});
builder.addDoubleProperty("Front Right Module", () -> getSendableDir(frWheel), (x) -> {});
builder.addDoubleProperty("Rear Left Module", () -> getSendableDir(rlWheel), (x) -> {});
builder.addDoubleProperty("Rear Right Module", () -> getSendableDir(rrWheel), (x) -> {});
}

// Gets the direction to send to the dashboard for a given SwerveWheel
private double getSendableDir (SwerveWheel wheel) {
return (wheel.getDirection() + 90) % 180 - 90;
}

/**
* Used to set a new {@link SwerveDrivingSpeeds} configuration.
* @param swerveDrivingSpeeds The new {@code SwerveDrivingSpeeds} configuration
Expand Down

0 comments on commit 70488f4

Please sign in to comment.