Compare commits

...

7 Commits

Author SHA1 Message Date
Eric Ratliff
8d26c4ea1f Fixed issues, ready to test 2026-02-06 10:09:08 -06:00
Eric Ratliff
32323e7abc Moved to hardware 2026-02-06 06:23:25 -06:00
Eric Ratliff
4274814216 Updated javadocs 2026-02-06 06:14:55 -06:00
Eric Ratliff
f9b99c781e Made mock package 2026-02-06 06:13:40 -06:00
Eric Ratliff
160a8b9563 MockMotor is now MockDCMotor just for clarity 2026-02-06 05:40:07 -06:00
Eric Ratliff
8087f31b05 Removed temp file 2026-02-06 05:35:40 -06:00
Eric Ratliff
8e57d01b23 Supporting a CRServo motor 2026-02-06 05:34:56 -06:00
24 changed files with 337 additions and 524 deletions

View File

@@ -14,7 +14,8 @@ java {
// Exclude FTC hardware files from PC compilation (they need Android SDK) // Exclude FTC hardware files from PC compilation (they need Android SDK)
tasks.withType<JavaCompile> { tasks.withType<JavaCompile> {
exclude("**/FtcMotor.java") exclude("**/FtcDCMotor.java")
exclude("**/FtcCRServo.java")
exclude("**/FtcPotentiometer.java") exclude("**/FtcPotentiometer.java")
exclude("**/opmodes/ChuteOpMode.java") exclude("**/opmodes/ChuteOpMode.java")
} }
@@ -24,7 +25,8 @@ tasks.javadoc {
include("**/subsystems/chute/**") include("**/subsystems/chute/**")
// But exclude FTC hardware files (they need Android SDK) // But exclude FTC hardware files (they need Android SDK)
exclude("**/FtcMotor.java") exclude("**/FtcDCMotor.java")
exclude("**/FtcCRServo.java")
exclude("**/FtcPotentiometer.java") exclude("**/FtcPotentiometer.java")
exclude("**/opmodes/**") exclude("**/opmodes/**")
@@ -50,7 +52,10 @@ tasks.register<Copy>("deployToSDK") {
val sdkDir = "/home/eric/.weevil/ftc-sdk" val sdkDir = "/home/eric/.weevil/ftc-sdk"
from("src/main/java") { from("src/main/java") {
include("robot/**/*.java") include("org/firstinspires/ftc/teamcode/**/*.java")
exclude("**/mock/MockCRServo.java")
exclude("**/mock/MockDCMotor.java")
exclude("**/mock/MockPotentiometer.java")
} }
into(layout.projectDirectory.dir("$sdkDir/TeamCode/src/main/java")) into(layout.projectDirectory.dir("$sdkDir/TeamCode/src/main/java"))

View File

@@ -61,14 +61,6 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2"> <div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
<div class="block">Simple chute controller with homing and position control.</div> <div class="block">Simple chute controller with homing and position control.</div>
</div> </div>
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></div>
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
<div class="block">Simple mock motor.</div>
</div>
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></div>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
<div class="block">Simple mock potentiometer with configurable wraparound.</div>
</div>
</div> </div>
</div> </div>
</main> </main>

View File

@@ -68,7 +68,7 @@ loadScripts(document, 'script');</script>
<dd> <dd>
<div class="block">Creates chute with mock hardware and custom pot wraparound.</div> <div class="block">Creates chute with mock hardware and custom pot wraparound.</div>
</dd> </dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html#%3Cinit%3E(org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController,org.firstinspires.ftc.teamcode.subsystems.chute.MockMotor,org.firstinspires.ftc.teamcode.subsystems.chute.MockPotentiometer)" class="member-name-link">Chute(ChuteController, MockMotor, MockPotentiometer)</a> - Constructor for class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></dt> <dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html#%3Cinit%3E(org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController,org.firstinspires.ftc.teamcode.mock.MockMotor,org.firstinspires.ftc.teamcode.mock.MockPotentiometer)" class="member-name-link">Chute(ChuteController, MockMotor, MockPotentiometer)</a> - Constructor for class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></dt>
<dd> <dd>
<div class="block">Creates chute with real FTC hardware adapters.</div> <div class="block">Creates chute with real FTC hardware adapters.</div>
</dd> </dd>
@@ -76,7 +76,7 @@ loadScripts(document, 'script');</script>
<dd> <dd>
<div class="block">Simple chute controller with homing and position control.</div> <div class="block">Simple chute controller with homing and position control.</div>
</dd> </dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html#%3Cinit%3E(org.firstinspires.ftc.teamcode.subsystems.chute.MockMotor,org.firstinspires.ftc.teamcode.subsystems.chute.MockPotentiometer,double)" class="member-name-link">ChuteController(MockMotor, MockPotentiometer, double)</a> - Constructor for class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></dt> <dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html#%3Cinit%3E(org.firstinspires.ftc.teamcode.mock.MockMotor,org.firstinspires.ftc.teamcode.mock.MockPotentiometer,double)" class="member-name-link">ChuteController(MockMotor, MockPotentiometer, double)</a> - Constructor for class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></dt>
<dd> <dd>
<div class="block">Create a new chute controller.</div> <div class="block">Create a new chute controller.</div>
</dd> </dd>
@@ -104,22 +104,14 @@ loadScripts(document, 'script');</script>
<dd> <dd>
<div class="block">Get current position of chute.</div> <div class="block">Get current position of chute.</div>
</dd> </dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html#getPosition()" class="member-name-link">getPosition()</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></dt>
<dd>&nbsp;</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html#getPot()" class="member-name-link">getPot()</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></dt> <dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html#getPot()" class="member-name-link">getPot()</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></dt>
<dd> <dd>
<div class="block">Gets potentiometer instance for testing.</div> <div class="block">Gets potentiometer instance for testing.</div>
</dd> </dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html#getPower()" class="member-name-link">getPower()</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></dt>
<dd>&nbsp;</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html#getVoltage()" class="member-name-link">getVoltage()</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></dt>
<dd>&nbsp;</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html#getWrapAmount()" class="member-name-link">getWrapAmount()</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></dt> <dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html#getWrapAmount()" class="member-name-link">getWrapAmount()</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></dt>
<dd> <dd>
<div class="block">Get the pot wraparound amount.</div> <div class="block">Get the pot wraparound amount.</div>
</dd> </dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html#getWrapAmount()" class="member-name-link">getWrapAmount()</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></dt>
<dd>&nbsp;</dd>
</dl> </dl>
<h2 class="title" id="I:H">H</h2> <h2 class="title" id="I:H">H</h2>
<dl class="index"> <dl class="index">
@@ -157,24 +149,6 @@ loadScripts(document, 'script');</script>
</dl> </dl>
<h2 class="title" id="I:M">M</h2> <h2 class="title" id="I:M">M</h2>
<dl class="index"> <dl class="index">
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a> - Class in <a href="org/firstinspires/ftc/teamcode/subsystems/chute/package-summary.html">org.firstinspires.ftc.teamcode.subsystems.chute</a></dt>
<dd>
<div class="block">Simple mock motor.</div>
</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html#%3Cinit%3E()" class="member-name-link">MockMotor()</a> - Constructor for class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></dt>
<dd>&nbsp;</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a> - Class in <a href="org/firstinspires/ftc/teamcode/subsystems/chute/package-summary.html">org.firstinspires.ftc.teamcode.subsystems.chute</a></dt>
<dd>
<div class="block">Simple mock potentiometer with configurable wraparound.</div>
</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html#%3Cinit%3E()" class="member-name-link">MockPotentiometer()</a> - Constructor for class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></dt>
<dd>
<div class="block">Create potentiometer with default 2pi wraparound.</div>
</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html#%3Cinit%3E(double)" class="member-name-link">MockPotentiometer(double)</a> - Constructor for class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></dt>
<dd>
<div class="block">Create potentiometer with custom wraparound amount.</div>
</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html#moveToPosition(double)" class="member-name-link">moveToPosition(double)</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></dt> <dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html#moveToPosition(double)" class="member-name-link">moveToPosition(double)</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></dt>
<dd> <dd>
<div class="block">Move to target position.</div> <div class="block">Move to target position.</div>
@@ -187,12 +161,6 @@ loadScripts(document, 'script');</script>
</dl> </dl>
<h2 class="title" id="I:S">S</h2> <h2 class="title" id="I:S">S</h2>
<dl class="index"> <dl class="index">
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html#setPosition(double)" class="member-name-link">setPosition(double)</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></dt>
<dd>&nbsp;</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html#setPosition(double)" class="member-name-link">setPosition(double)</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></dt>
<dd>&nbsp;</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html#setPower(double)" class="member-name-link">setPower(double)</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></dt>
<dd>&nbsp;</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html#setTargetPosition(double)" class="member-name-link">setTargetPosition(double)</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></dt> <dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html#setTargetPosition(double)" class="member-name-link">setTargetPosition(double)</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></dt>
<dd> <dd>
<div class="block">Commands chute to move to target position.</div> <div class="block">Commands chute to move to target position.</div>
@@ -216,10 +184,6 @@ loadScripts(document, 'script');</script>
<dd> <dd>
<div class="block">Update controller state - call this every loop iteration.</div> <div class="block">Update controller state - call this every loop iteration.</div>
</dd> </dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html#update(double)" class="member-name-link">update(double)</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></dt>
<dd>&nbsp;</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html#updatePosition(double)" class="member-name-link">updatePosition(double)</a> - Method in class org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></dt>
<dd>&nbsp;</dd>
<dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html#usage-with-real-hardware-heading" class="search-tag-link">Usage with Real Hardware</a> - Search tag in class org.firstinspires.ftc.teamcode.subsystems.chute.Chute</dt> <dt><a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html#usage-with-real-hardware-heading" class="search-tag-link">Usage with Real Hardware</a> - Search tag in class org.firstinspires.ftc.teamcode.subsystems.chute.Chute</dt>
<dd>Section</dd> <dd>Section</dd>
</dl> </dl>

View File

@@ -1 +1 @@
memberSearchIndex = [{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"Chute(ChuteController, MockMotor, MockPotentiometer)","u":"%3Cinit%3E(org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController,org.firstinspires.ftc.teamcode.subsystems.chute.MockMotor,org.firstinspires.ftc.teamcode.subsystems.chute.MockPotentiometer)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"Chute(double)","u":"%3Cinit%3E(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"Chute(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"ChuteController(MockMotor, MockPotentiometer, double)","u":"%3Cinit%3E(org.firstinspires.ftc.teamcode.subsystems.chute.MockMotor,org.firstinspires.ftc.teamcode.subsystems.chute.MockPotentiometer,double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"getHomeVoltage()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"getMotor()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"getPosition()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"getPosition()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockMotor","l":"getPosition()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"getPot()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockMotor","l":"getPower()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockPotentiometer","l":"getVoltage()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"getWrapAmount()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockPotentiometer","l":"getWrapAmount()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"home()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"home()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"isAtTarget()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"isHomed()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"isHomed()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"isMoving()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"isMoving()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockMotor","l":"MockMotor()","u":"%3Cinit%3E()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockPotentiometer","l":"MockPotentiometer()","u":"%3Cinit%3E()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockPotentiometer","l":"MockPotentiometer(double)","u":"%3Cinit%3E(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"moveToPosition(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockMotor","l":"setPosition(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockPotentiometer","l":"setPosition(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockMotor","l":"setPower(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"setTargetPosition(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"stop()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"stop()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"update(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"update(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockMotor","l":"update(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"MockPotentiometer","l":"updatePosition(double)"}];updateSearchResults(); memberSearchIndex = [{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"Chute(ChuteController, MockMotor, MockPotentiometer)","u":"%3Cinit%3E(org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController,org.firstinspires.ftc.teamcode.mock.MockMotor,org.firstinspires.ftc.teamcode.mock.MockPotentiometer)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"Chute(double)","u":"%3Cinit%3E(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"Chute(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"ChuteController(MockMotor, MockPotentiometer, double)","u":"%3Cinit%3E(org.firstinspires.ftc.teamcode.mock.MockMotor,org.firstinspires.ftc.teamcode.mock.MockPotentiometer,double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"getHomeVoltage()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"getMotor()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"getPosition()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"getPosition()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"getPot()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"getWrapAmount()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"home()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"home()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"isAtTarget()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"isHomed()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"isHomed()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"isMoving()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"isMoving()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"moveToPosition(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"setTargetPosition(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"stop()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"stop()"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"Chute","l":"update(double)"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","c":"ChuteController","l":"update(double)"}];updateSearchResults();

View File

@@ -111,7 +111,14 @@ loadScripts(document, 'script');</script>
<h2 id="usage-with-real-hardware-heading">Usage with Real Hardware</h2> <h2 id="usage-with-real-hardware-heading">Usage with Real Hardware</h2>
<pre> <pre>
FtcMotor motor = new FtcMotor(hardwareMap.get(DcMotor.class, "chute_motor")); // With a DcMotor:
FtcDCMotor motor = new FtcDCMotor(hardwareMap.get(DcMotor.class, "chute_motor"));
FtcPotentiometer pot = new FtcPotentiometer(hardwareMap.get(AnalogInput.class, "chute_pot"));
ChuteController controller = new ChuteController(motor, pot, 4 * Math.PI);
Chute chute = new Chute(controller, motor, pot);
// With a CRServo (drop-in replacement):
FtcCRServo motor = new FtcCRServo(hardwareMap.get(CRServo.class, "chute_servo"));
FtcPotentiometer pot = new FtcPotentiometer(hardwareMap.get(AnalogInput.class, "chute_pot")); FtcPotentiometer pot = new FtcPotentiometer(hardwareMap.get(AnalogInput.class, "chute_pot"));
ChuteController controller = new ChuteController(motor, pot, 4 * Math.PI); ChuteController controller = new ChuteController(motor, pot, 4 * Math.PI);
Chute chute = new Chute(controller, motor, pot); Chute chute = new Chute(controller, motor, pot);
@@ -130,7 +137,19 @@ loadScripts(document, 'script');</script>
<dd> <dd>
<ul class="tag-list-long"> <ul class="tag-list-long">
<li><a href="ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute"><code>ChuteController</code></a></li> <li><a href="ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute"><code>ChuteController</code></a></li>
<li><a href="MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute"><code>MockPotentiometer</code></a></li> <li>
<details class="invalid-tag">
<summary>invalid reference</summary>
<pre><code>FtcDCMotor</code></pre>
</details>
</li>
<li>
<details class="invalid-tag">
<summary>invalid reference</summary>
<pre><code>FtcCRServo</code></pre>
</details>
</li>
<li><code>MockPotentiometer</code></li>
<li> <li>
<details class="invalid-tag"> <details class="invalid-tag">
<summary>invalid reference</summary> <summary>invalid reference</summary>
@@ -160,9 +179,9 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color"> <div class="col-last odd-row-color">
<div class="block">Creates chute with mock hardware and custom pot wraparound.</div> <div class="block">Creates chute with mock hardware and custom pot wraparound.</div>
</div> </div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController,org.firstinspires.ftc.teamcode.subsystems.chute.MockMotor,org.firstinspires.ftc.teamcode.subsystems.chute.MockPotentiometer)" class="member-name-link">Chute</a><wbr>(<a href="ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a>&nbsp;controller, <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController,org.firstinspires.ftc.teamcode.mock.MockMotor,org.firstinspires.ftc.teamcode.mock.MockPotentiometer)" class="member-name-link">Chute</a><wbr>(<a href="ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a>&nbsp;controller,
<a href="MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a>&nbsp;motor, org.firstinspires.ftc.teamcode.mock.MockMotor&nbsp;motor,
<a href="MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a>&nbsp;pot)</code></div> org.firstinspires.ftc.teamcode.mock.MockPotentiometer&nbsp;pot)</code></div>
<div class="col-last even-row-color"> <div class="col-last even-row-color">
<div class="block">Creates chute with real FTC hardware adapters.</div> <div class="block">Creates chute with real FTC hardware adapters.</div>
</div> </div>
@@ -180,7 +199,7 @@ loadScripts(document, 'script');</script>
<div class="table-header col-first">Modifier and Type</div> <div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div> <div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div> <div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></code></div> <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>org.firstinspires.ftc.teamcode.mock.MockMotor</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-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-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets motor instance for testing.</div> <div class="block">Gets motor instance for testing.</div>
@@ -190,7 +209,7 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets current position of chute.</div> <div class="block">Gets current position of chute.</div>
</div> </div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></code></div> <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>org.firstinspires.ftc.teamcode.mock.MockPotentiometer</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPot()" class="member-name-link">getPot</a>()</code></div> <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPot()" class="member-name-link">getPot</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets potentiometer instance for testing.</div> <div class="block">Gets potentiometer instance for testing.</div>
@@ -274,17 +293,17 @@ loadScripts(document, 'script');</script>
</section> </section>
</li> </li>
<li> <li>
<section class="detail" id="&lt;init&gt;(org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController,org.firstinspires.ftc.teamcode.subsystems.chute.MockMotor,org.firstinspires.ftc.teamcode.subsystems.chute.MockPotentiometer)"> <section class="detail" id="&lt;init&gt;(org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController,org.firstinspires.ftc.teamcode.mock.MockMotor,org.firstinspires.ftc.teamcode.mock.MockPotentiometer)">
<h3>Chute</h3> <h3>Chute</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Chute</span><wbr><span class="parameters">(<a href="ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a>&nbsp;controller, <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Chute</span><wbr><span class="parameters">(<a href="ChuteController.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a>&nbsp;controller,
<a href="MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a>&nbsp;motor, org.firstinspires.ftc.teamcode.mock.MockMotor&nbsp;motor,
<a href="MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a>&nbsp;pot)</span></div> org.firstinspires.ftc.teamcode.mock.MockPotentiometer&nbsp;pot)</span></div>
<div class="block">Creates chute with real FTC hardware adapters. <div class="block">Creates chute with real FTC hardware adapters.
Use this constructor in actual FTC OpModes with hardware from hardwareMap.</div> Use this constructor in actual FTC OpModes with hardware from hardwareMap.</div>
<dl class="notes"> <dl class="notes">
<dt>Parameters:</dt> <dt>Parameters:</dt>
<dd><code>controller</code> - Pre-configured controller with real hardware</dd> <dd><code>controller</code> - Pre-configured controller with real hardware</dd>
<dd><code>motor</code> - FtcMotor adapter wrapping DcMotor</dd> <dd><code>motor</code> - Motor adapter (FtcDCMotor or FtcCRServo)</dd>
<dd><code>pot</code> - FtcPotentiometer adapter wrapping AnalogInput</dd> <dd><code>pot</code> - FtcPotentiometer adapter wrapping AnalogInput</dd>
<dt>See Also:</dt> <dt>See Also:</dt>
<dd> <dd>
@@ -292,7 +311,13 @@ loadScripts(document, 'script');</script>
<li> <li>
<details class="invalid-tag"> <details class="invalid-tag">
<summary>invalid reference</summary> <summary>invalid reference</summary>
<pre><code>FtcMotor</code></pre> <pre><code>FtcDCMotor</code></pre>
</details>
</li>
<li>
<details class="invalid-tag">
<summary>invalid reference</summary>
<pre><code>FtcCRServo</code></pre>
</details> </details>
</li> </li>
<li> <li>
@@ -401,7 +426,7 @@ loadScripts(document, 'script');</script>
<li> <li>
<section class="detail" id="getMotor()"> <section class="detail" id="getMotor()">
<h3>getMotor</h3> <h3>getMotor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></span>&nbsp;<span class="element-name">getMotor</span>()</div> <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">org.firstinspires.ftc.teamcode.mock.MockMotor</span>&nbsp;<span class="element-name">getMotor</span>()</div>
<div class="block">Gets motor instance for testing.</div> <div class="block">Gets motor instance for testing.</div>
<dl class="notes"> <dl class="notes">
<dt>Returns:</dt> <dt>Returns:</dt>
@@ -412,7 +437,7 @@ loadScripts(document, 'script');</script>
<li> <li>
<section class="detail" id="getPot()"> <section class="detail" id="getPot()">
<h3>getPot</h3> <h3>getPot</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></span>&nbsp;<span class="element-name">getPot</span>()</div> <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">org.firstinspires.ftc.teamcode.mock.MockPotentiometer</span>&nbsp;<span class="element-name">getPot</span>()</div>
<div class="block">Gets potentiometer instance for testing.</div> <div class="block">Gets potentiometer instance for testing.</div>
<dl class="notes"> <dl class="notes">
<dt>Returns:</dt> <dt>Returns:</dt>

View File

@@ -102,8 +102,8 @@ loadScripts(document, 'script');</script>
<div class="summary-table two-column-summary"> <div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div> <div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div> <div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.firstinspires.ftc.teamcode.subsystems.chute.MockMotor,org.firstinspires.ftc.teamcode.subsystems.chute.MockPotentiometer,double)" class="member-name-link">ChuteController</a><wbr>(<a href="MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a>&nbsp;motor, <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.firstinspires.ftc.teamcode.mock.MockMotor,org.firstinspires.ftc.teamcode.mock.MockPotentiometer,double)" class="member-name-link">ChuteController</a><wbr>(org.firstinspires.ftc.teamcode.mock.MockMotor&nbsp;motor,
<a href="MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a>&nbsp;pot, org.firstinspires.ftc.teamcode.mock.MockPotentiometer&nbsp;pot,
double&nbsp;maxExtension)</code></div> double&nbsp;maxExtension)</code></div>
<div class="col-last even-row-color"> <div class="col-last even-row-color">
<div class="block">Create a new chute controller.</div> <div class="block">Create a new chute controller.</div>
@@ -185,10 +185,10 @@ loadScripts(document, 'script');</script>
<h2>Constructor Details</h2> <h2>Constructor Details</h2>
<ul class="member-list"> <ul class="member-list">
<li> <li>
<section class="detail" id="&lt;init&gt;(org.firstinspires.ftc.teamcode.subsystems.chute.MockMotor,org.firstinspires.ftc.teamcode.subsystems.chute.MockPotentiometer,double)"> <section class="detail" id="&lt;init&gt;(org.firstinspires.ftc.teamcode.mock.MockMotor,org.firstinspires.ftc.teamcode.mock.MockPotentiometer,double)">
<h3>ChuteController</h3> <h3>ChuteController</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ChuteController</span><wbr><span class="parameters">(<a href="MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a>&nbsp;motor, <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ChuteController</span><wbr><span class="parameters">(org.firstinspires.ftc.teamcode.mock.MockMotor&nbsp;motor,
<a href="MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a>&nbsp;pot, org.firstinspires.ftc.teamcode.mock.MockPotentiometer&nbsp;pot,
double&nbsp;maxExtension)</span></div> double&nbsp;maxExtension)</span></div>
<div class="block">Create a new chute controller.</div> <div class="block">Create a new chute controller.</div>
<dl class="notes"> <dl class="notes">

View File

@@ -1,207 +0,0 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) -->
<title>MockMotor (FtcRobotController 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="description" content="declaration: package: org.firstinspires.ftc.teamcode.subsystems.chute, class: MockMotor">
<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">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="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-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li>Field</li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.firstinspires.ftc.teamcode.subsystems.chute</a></div>
<h1 title="Class MockMotor" class="title">Class MockMotor</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/21/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">org.firstinspires.ftc.teamcode.subsystems.chute.MockMotor</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">MockMotor</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">Simple mock motor.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">MockMotor</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-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" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-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">&nbsp;</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="#getPower()" class="member-name-link">getPower</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</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&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</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="#setPower(double)" class="member-name-link">setPower</a><wbr>(double&nbsp;power)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</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="#update(double)" class="member-name-link">update</a><wbr>(double&nbsp;dt)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>MockMotor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">MockMotor</span>()</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="setPower(double)">
<h3>setPower</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setPower</span><wbr><span class="parameters">(double&nbsp;power)</span></div>
</section>
</li>
<li>
<section class="detail" id="getPower()">
<h3>getPower</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getPower</span>()</div>
</section>
</li>
<li>
<section class="detail" id="update(double)">
<h3>update</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">update</span><wbr><span class="parameters">(double&nbsp;dt)</span></div>
</section>
</li>
<li>
<section class="detail" id="getPosition()">
<h3>getPosition</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getPosition</span>()</div>
</section>
</li>
<li>
<section class="detail" id="setPosition(double)">
<h3>setPosition</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setPosition</span><wbr><span class="parameters">(double&nbsp;pos)</span></div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>

View File

@@ -1,216 +0,0 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) -->
<title>MockPotentiometer (FtcRobotController 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="description" content="declaration: package: org.firstinspires.ftc.teamcode.subsystems.chute, class: MockPotentiometer">
<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">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="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-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li>Field</li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.firstinspires.ftc.teamcode.subsystems.chute</a></div>
<h1 title="Class MockPotentiometer" class="title">Class MockPotentiometer</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/21/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">org.firstinspires.ftc.teamcode.subsystems.chute.MockPotentiometer</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">MockPotentiometer</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">Simple mock potentiometer with configurable wraparound.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">MockPotentiometer</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Create potentiometer with default 2pi wraparound.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(double)" class="member-name-link">MockPotentiometer</a><wbr>(double&nbsp;wrapAmount)</code></div>
<div class="col-last odd-row-color">
<div class="block">Create potentiometer with custom wraparound amount.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-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" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-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="#getVoltage()" class="member-name-link">getVoltage</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</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="#getWrapAmount()" class="member-name-link">getWrapAmount</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</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&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</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="#updatePosition(double)" class="member-name-link">updatePosition</a><wbr>(double&nbsp;delta)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/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/21/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>MockPotentiometer</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">MockPotentiometer</span>()</div>
<div class="block">Create potentiometer with default 2pi wraparound.</div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(double)">
<h3>MockPotentiometer</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">MockPotentiometer</span><wbr><span class="parameters">(double&nbsp;wrapAmount)</span></div>
<div class="block">Create potentiometer with custom wraparound amount.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>wrapAmount</code> - Voltage at which pot wraps back to 0</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getVoltage()">
<h3>getVoltage</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getVoltage</span>()</div>
</section>
</li>
<li>
<section class="detail" id="setPosition(double)">
<h3>setPosition</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setPosition</span><wbr><span class="parameters">(double&nbsp;pos)</span></div>
</section>
</li>
<li>
<section class="detail" id="updatePosition(double)">
<h3>updatePosition</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">updatePosition</span><wbr><span class="parameters">(double&nbsp;delta)</span></div>
</section>
</li>
<li>
<section class="detail" id="getWrapAmount()">
<h3>getWrapAmount</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getWrapAmount</span>()</div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>

View File

@@ -83,14 +83,6 @@ loadScripts(document, 'script');</script>
<div class="col-last odd-row-color class-summary class-summary-tab2"> <div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Simple chute controller with homing and position control.</div> <div class="block">Simple chute controller with homing and position control.</div>
</div> </div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="MockMotor.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">Simple mock motor.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="MockPotentiometer.html" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Simple mock potentiometer with configurable wraparound.</div>
</div>
</div> </div>
</div> </div>
</li> </li>

View File

@@ -55,8 +55,6 @@ loadScripts(document, 'script');</script>
<ul> <ul>
<li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="Chute.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></li> <li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="Chute.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></li>
<li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="ChuteController.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></li> <li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="ChuteController.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></li>
<li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="MockMotor.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></li>
<li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="MockPotentiometer.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>

View File

@@ -59,8 +59,6 @@ loadScripts(document, 'script');</script>
<ul> <ul>
<li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></li> <li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/Chute.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">Chute</a></li>
<li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></li> <li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/ChuteController.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">ChuteController</a></li>
<li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockMotor.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockMotor</a></li>
<li class="circle">org.firstinspires.ftc.teamcode.subsystems.chute.<a href="org/firstinspires/ftc/teamcode/subsystems/chute/MockPotentiometer.html" class="type-name-link" title="class in org.firstinspires.ftc.teamcode.subsystems.chute">MockPotentiometer</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>

View File

@@ -1 +1 @@
typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","l":"Chute"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","l":"ChuteController"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","l":"MockMotor"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","l":"MockPotentiometer"}];updateSearchResults(); typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","l":"Chute"},{"p":"org.firstinspires.ftc.teamcode.subsystems.chute","l":"ChuteController"}];updateSearchResults();

Binary file not shown.

View File

@@ -0,0 +1,45 @@
package org.firstinspires.ftc.teamcode.hardware;
import com.qualcomm.robotcore.hardware.CRServo;
/**
* Adapter that wraps a real FTC CRServo and makes it look like a MockCRServo.
* Drop-in replacement for FtcDCMotor when the chute is driven by a continuous
* rotation servo instead of a DC motor.
*
* <p>CRServo has no encoder, zero-power behavior, or run mode—just power
* control—so this adapter is simpler than {@link FtcDCMotor}.
*
* <h2>Usage</h2>
* <pre>
* CRServo servo = hardwareMap.get(CRServo.class, "chute_servo");
* FtcCRServo motor = new FtcCRServo(servo);
* ChuteController controller = new ChuteController(motor, pot, maxExtension);
* </pre>
*
* @see FtcDCMotor
*/
public class FtcCRServo extends MockCRServo {
private final CRServo servo;
/**
* Create servo adapter.
* @param servo The real FTC CRServo from hardwareMap
*/
public FtcCRServo(CRServo servo) {
super();
this.servo = servo;
}
@Override
public void setPower(double power) {
super.setPower(power); // Track power in parent
servo.setPower(power); // Send to real servo
}
@Override
public void update(double dt) {
// Real servo updates itself — still call parent for mock position tracking
super.update(dt);
}
}

View File

@@ -1,19 +1,21 @@
package org.firstinspires.ftc.teamcode.subsystems.chute; package org.firstinspires.ftc.teamcode.hardware;
import com.qualcomm.robotcore.hardware.DcMotor; import com.qualcomm.robotcore.hardware.DcMotor;
/** /**
* Adapter that wraps a real FTC DcMotor and makes it look like a MockMotor. * Adapter that wraps a real FTC DcMotor and makes it look like a MockDCMotor.
* Use this to connect the chute controller to actual hardware. * Use this to connect the chute controller to actual hardware.
*
* @see FtcCRServo
*/ */
public class FtcMotor extends MockMotor { public class FtcDCMotor extends MockDCMotor {
private final DcMotor motor; private final DcMotor motor;
/** /**
* Create motor adapter. * Create motor adapter.
* @param motor The real FTC motor from hardwareMap * @param motor The real FTC motor from hardwareMap
*/ */
public FtcMotor(DcMotor motor) { public FtcDCMotor(DcMotor motor) {
super(); super();
this.motor = motor; this.motor = motor;

View File

@@ -1,4 +1,4 @@
package org.firstinspires.ftc.teamcode.subsystems.chute; package org.firstinspires.ftc.teamcode.hardware;
import com.qualcomm.robotcore.hardware.AnalogInput; import com.qualcomm.robotcore.hardware.AnalogInput;

View File

@@ -0,0 +1,37 @@
package org.firstinspires.ftc.teamcode.mock;
/**
* Mock continuous rotation servo for testing.
* Mirrors the override pattern of {@link FtcCRServo} without requiring the FTC SDK.
*
* <p>Extends MockMotor and overrides {@code setPower()} to track commanded values,
* letting tests verify that ChuteController correctly routes through a subclassed motor.
*
* @see FtcCRServo
* @see MockDCMotor
*/
public class MockCRServo extends MockMotor {
private double lastCommandedPower = 0.0;
private int setPowerCallCount = 0;
@Override
public void setPower(double power) {
lastCommandedPower = power;
setPowerCallCount++;
super.setPower(power);
}
/**
* @return The most recent power value passed to setPower
*/
public double getLastCommandedPower() {
return lastCommandedPower;
}
/**
* @return Total number of times setPower has been called
*/
public int getSetPowerCallCount() {
return setPowerCallCount;
}
}

View File

@@ -0,0 +1,12 @@
package org.firstinspires.ftc.teamcode.mock;
/**
* Mock DC motor for testing.
* Provides type identity for DC motor-specific code paths while
* inheriting all simulation behavior from {@link MockMotor}.
*
* @see FtcDCMotor
* @see MockCRServo
*/
public class MockDCMotor extends MockMotor {
}

View File

@@ -1,4 +1,4 @@
package org.firstinspires.ftc.teamcode.subsystems.chute; package org.firstinspires.ftc.teamcode.mock;
/** /**
* Simple mock motor. * Simple mock motor.

View File

@@ -1,4 +1,4 @@
package org.firstinspires.ftc.teamcode.subsystems.chute; package org.firstinspires.ftc.teamcode.mock;
/** /**
* Simple mock potentiometer with configurable wraparound. * Simple mock potentiometer with configurable wraparound.

View File

@@ -2,19 +2,23 @@ package org.firstinspires.ftc.teamcode.opmodes;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp; import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.CRServo;
import com.qualcomm.robotcore.hardware.DcMotor; import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.AnalogInput; import com.qualcomm.robotcore.hardware.AnalogInput;
import org.firstinspires.ftc.teamcode.subsystems.chute.Chute; import org.firstinspires.ftc.teamcode.subsystems.chute.Chute;
import org.firstinspires.ftc.teamcode.subsystems.chute.FtcMotor; import org.firstinspires.ftc.teamcode.hardware.FtcCRServo;
import org.firstinspires.ftc.teamcode.subsystems.chute.FtcPotentiometer; import org.firstinspires.ftc.teamcode.hardware.FtcDCMotor;
import org.firstinspires.ftc.teamcode.hardware.FtcPotentiometer;
import org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController; import org.firstinspires.ftc.teamcode.subsystems.chute.ChuteController;
import org.firstinspires.ftc.teamcode.mock.MockMotor;
/** /**
* Example OpMode demonstrating chute control with real hardware. * Example OpMode demonstrating chute control with real hardware.
* Supports either a DcMotor or CRServo as the actuator.
* *
* Hardware Config: * Hardware Config:
* - Motor: "chute_motor" (DcMotor) * - Motor: "chute_motor" (DcMotor) OR "chute_servo" (CRServo)
* - Potentiometer: "chute_pot" (AnalogInput) * - Potentiometer: "chute_pot" (AnalogInput)
*/ */
@TeleOp(name = "Chute Control") @TeleOp(name = "Chute Control")
@@ -22,6 +26,9 @@ public class ChuteOpMode extends LinearOpMode {
private Chute chute; private Chute chute;
// Set to true to use a CRServo instead of a DcMotor
private static final boolean USE_SERVO = false;
// Pot configuration - change this if your pot has different range // Pot configuration - change this if your pot has different range
private static final double POT_WRAP_AMOUNT = 2 * Math.PI; private static final double POT_WRAP_AMOUNT = 2 * Math.PI;
@@ -35,14 +42,20 @@ public class ChuteOpMode extends LinearOpMode {
@Override @Override
public void runOpMode() { public void runOpMode() {
// Get hardware from config // Get hardware from config
DcMotor chuteMotor = hardwareMap.get(DcMotor.class, "chute_motor");
AnalogInput chutePot = hardwareMap.get(AnalogInput.class, "chute_pot"); AnalogInput chutePot = hardwareMap.get(AnalogInput.class, "chute_pot");
// Create hardware adapters
FtcMotor motor = new FtcMotor(chuteMotor);
FtcPotentiometer pot = new FtcPotentiometer(chutePot, POT_WRAP_AMOUNT); FtcPotentiometer pot = new FtcPotentiometer(chutePot, POT_WRAP_AMOUNT);
// Create chute controller with real hardware // Create motor adapter — either DcMotor or CRServo
MockMotor motor;
if (USE_SERVO) {
FtcCRServo chuteServo = hardwareMap.get(CRServo.class, "chute_servo");
motor = new FtcCRServo(chuteServo);
} else {
FtcDCMotor chuteMotor = hardwareMap.get(DcMotor.class, "chute_motor");
motor = new FtcDCMotor(chuteMotor);
}
// Create chute controller with whichever actuator was selected
ChuteController controller = new ChuteController(motor, pot, MAX); ChuteController controller = new ChuteController(motor, pot, MAX);
chute = new Chute(controller, motor, pot); chute = new Chute(controller, motor, pot);

View File

@@ -1,5 +1,9 @@
package org.firstinspires.ftc.teamcode.subsystems.chute; package org.firstinspires.ftc.teamcode.subsystems.chute;
import org.firstinspires.ftc.teamcode.mock.MockMotor;
import org.firstinspires.ftc.teamcode.mock.MockDCMotor;
import org.firstinspires.ftc.teamcode.mock.MockPotentiometer;
/** /**
* Main entry point for chute control system. * Main entry point for chute control system.
* *
@@ -22,7 +26,14 @@ package org.firstinspires.ftc.teamcode.subsystems.chute;
* *
* <h2>Usage with Real Hardware</h2> * <h2>Usage with Real Hardware</h2>
* <pre> * <pre>
* FtcMotor motor = new FtcMotor(hardwareMap.get(DcMotor.class, "chute_motor")); * // With a DcMotor:
* FtcDCMotor motor = new FtcDCMotor(hardwareMap.get(DcMotor.class, "chute_motor"));
* FtcPotentiometer pot = new FtcPotentiometer(hardwareMap.get(AnalogInput.class, "chute_pot"));
* ChuteController controller = new ChuteController(motor, pot, 4 * Math.PI);
* Chute chute = new Chute(controller, motor, pot);
*
* // With a CRServo (drop-in replacement):
* FtcCRServo motor = new FtcCRServo(hardwareMap.get(CRServo.class, "chute_servo"));
* FtcPotentiometer pot = new FtcPotentiometer(hardwareMap.get(AnalogInput.class, "chute_pot")); * FtcPotentiometer pot = new FtcPotentiometer(hardwareMap.get(AnalogInput.class, "chute_pot"));
* ChuteController controller = new ChuteController(motor, pot, 4 * Math.PI); * ChuteController controller = new ChuteController(motor, pot, 4 * Math.PI);
* Chute chute = new Chute(controller, motor, pot); * Chute chute = new Chute(controller, motor, pot);
@@ -38,6 +49,8 @@ package org.firstinspires.ftc.teamcode.subsystems.chute;
* </ul> * </ul>
* *
* @see ChuteController * @see ChuteController
* @see FtcDCMotor
* @see FtcCRServo
* @see MockPotentiometer * @see MockPotentiometer
* @see FtcPotentiometer * @see FtcPotentiometer
*/ */
@@ -64,7 +77,7 @@ public class Chute {
* @param wrapAmount Potentiometer wraparound amount in radians (e.g., pi, 2pi, 4pi) * @param wrapAmount Potentiometer wraparound amount in radians (e.g., pi, 2pi, 4pi)
*/ */
public Chute(double maxExtension, double wrapAmount) { public Chute(double maxExtension, double wrapAmount) {
this.motor = new MockMotor(); this.motor = new MockDCMotor();
this.pot = new MockPotentiometer(wrapAmount); this.pot = new MockPotentiometer(wrapAmount);
this.controller = new ChuteController(motor, pot, maxExtension); this.controller = new ChuteController(motor, pot, maxExtension);
} }
@@ -74,9 +87,10 @@ public class Chute {
* Use this constructor in actual FTC OpModes with hardware from hardwareMap. * Use this constructor in actual FTC OpModes with hardware from hardwareMap.
* *
* @param controller Pre-configured controller with real hardware * @param controller Pre-configured controller with real hardware
* @param motor FtcMotor adapter wrapping DcMotor * @param motor Motor adapter (FtcDCMotor or FtcCRServo)
* @param pot FtcPotentiometer adapter wrapping AnalogInput * @param pot FtcPotentiometer adapter wrapping AnalogInput
* @see FtcMotor * @see FtcDCMotor
* @see FtcCRServo
* @see FtcPotentiometer * @see FtcPotentiometer
*/ */
public Chute(ChuteController controller, MockMotor motor, MockPotentiometer pot) { public Chute(ChuteController controller, MockMotor motor, MockPotentiometer pot) {

View File

@@ -1,5 +1,8 @@
package org.firstinspires.ftc.teamcode.subsystems.chute; package org.firstinspires.ftc.teamcode.subsystems.chute;
import org.firstinspires.ftc.teamcode.mock.MockMotor;
import org.firstinspires.ftc.teamcode.mock.MockPotentiometer;
/** /**
* Simple chute controller with homing and position control. * Simple chute controller with homing and position control.
*/ */

View File

@@ -1,5 +1,7 @@
package org.firstinspires.ftc.teamcode.subsystems.chute; package org.firstinspires.ftc.teamcode.subsystems.chute;
import org.firstinspires.ftc.teamcode.mock.MockCRServo;
import org.firstinspires.ftc.teamcode.mock.MockPotentiometer;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*;
@@ -268,4 +270,138 @@ public class ChuteTest {
assertEquals(3.0, chute.getPot().getWrapAmount(), EPSILON, assertEquals(3.0, chute.getPot().getWrapAmount(), EPSILON,
"Pot should wrap at 3.0 radians"); "Pot should wrap at 3.0 radians");
} }
// ========================================================================
// CRServo adapter tests
//
// FtcCRServo extends MockDCMotor and overrides setPower() to forward to real
// hardware. MockCRServo replicates that pattern without the FTC SDK,
// proving the full pipeline works when the motor is a subclass.
// ========================================================================
/**
* Verify a subclassed motor homes correctly through ChuteController.
* This is the same scenario as testHoming() but with the override path.
*/
@Test
public void testCRServoHoming() {
MockCRServo servo = new MockCRServo();
MockPotentiometer pot = new MockPotentiometer();
ChuteController controller = new ChuteController(servo, pot, 10.0);
Chute chute = new Chute(controller, servo, pot);
servo.setPosition(0.5);
pot.setPosition(0.5);
chute.home();
assertTrue(servo.getSetPowerCallCount() > 0, "setPower should be called via override");
for (int i = 0; i < 200; i++) {
chute.update(DT);
if (chute.isHomed()) break;
}
assertTrue(chute.isHomed(), "Should home with subclassed motor");
assertEquals(0.0, servo.getPower(), EPSILON, "Motor should be stopped after homing");
assertEquals(0.0, servo.getLastCommandedPower(), EPSILON,
"Override path should also see zero power");
}
/**
* Verify move-to-position works end-to-end through the override path.
*/
@Test
public void testCRServoMoveToPosition() {
MockCRServo servo = new MockCRServo();
MockPotentiometer pot = new MockPotentiometer();
ChuteController controller = new ChuteController(servo, pot, 10.0);
Chute chute = new Chute(controller, servo, pot);
servo.setPosition(0.2);
pot.setPosition(0.2);
chute.home();
for (int i = 0; i < 200; i++) {
chute.update(DT);
if (chute.isHomed()) break;
}
assertTrue(chute.isHomed(), "Should be homed");
int callsBefore = servo.getSetPowerCallCount();
chute.setTargetPosition(2.0);
for (int i = 0; i < 1000; i++) {
chute.update(DT);
if (chute.isAtTarget()) break;
}
assertTrue(chute.isAtTarget(), "Should reach target with subclassed motor");
assertTrue(Math.abs(chute.getPosition() - 2.0) < 0.3,
"Position should be close to 2.0, got: " + chute.getPosition());
assertTrue(servo.getSetPowerCallCount() > callsBefore,
"setPower override should have been called during movement");
}
/**
* Verify multi-wrap tracking works through the override path.
* CRServos are common on linear actuators that travel multiple pot rotations.
*/
@Test
public void testCRServoMultipleRotations() {
MockCRServo servo = new MockCRServo();
MockPotentiometer pot = new MockPotentiometer();
ChuteController controller = new ChuteController(servo, pot, 25.0);
Chute chute = new Chute(controller, servo, pot);
servo.setPosition(0.2);
pot.setPosition(0.2);
chute.home();
for (int i = 0; i < 200; i++) {
chute.update(DT);
if (chute.isHomed()) break;
}
assertTrue(chute.isHomed(), "Should be homed");
double target = 3.5 * 2 * Math.PI;
chute.setTargetPosition(target);
for (int i = 0; i < 2000; i++) {
chute.update(DT);
if (chute.isAtTarget()) break;
}
assertTrue(chute.getPosition() > 3.0 * 2 * Math.PI,
"Position should be > 3*2pi, got: " + chute.getPosition());
assertTrue(Math.abs(chute.getPosition() - target) < 1.5,
"Position should be near target, expected: " + target + ", got: " + chute.getPosition());
}
/**
* Verify emergency stop propagates through the override path.
*/
@Test
public void testCRServoStop() {
MockCRServo servo = new MockCRServo();
MockPotentiometer pot = new MockPotentiometer();
ChuteController controller = new ChuteController(servo, pot, 10.0);
Chute chute = new Chute(controller, servo, pot);
servo.setPosition(0.1);
pot.setPosition(0.1);
chute.home();
for (int i = 0; i < 200; i++) {
chute.update(DT);
if (chute.isHomed()) break;
}
chute.setTargetPosition(5.0);
for (int i = 0; i < 10; i++) {
chute.update(DT);
}
assertTrue(chute.isMoving(), "Should be moving");
chute.stop();
assertFalse(chute.isMoving(), "Should stop immediately");
assertEquals(0.0, servo.getLastCommandedPower(), EPSILON,
"Override path should see zero power after stop");
}
} }