Add chute controller with homing and position unwrapping

Implements automated homing, potentiometer wraparound tracking, and position
control for FTC chute mechanism. Includes mock hardware for testing and
real hardware adapters for deployment.
This commit is contained in:
Eric Ratliff
2026-02-03 23:41:58 -06:00
parent ebccb21ed2
commit a69c2bf718
14 changed files with 765 additions and 46 deletions

View File

@@ -1,19 +1,24 @@
plugins {
java
}
dependencies {
// Testing (runs on PC without SDK)
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.mockito:mockito-core:5.5.0")
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
// Exclude FTC hardware files from PC compilation (they need Android SDK)
tasks.withType<JavaCompile> {
exclude("**/FtcMotor.java")
exclude("**/FtcPotentiometer.java")
exclude("**/opmodes/ChuteOpMode.java")
}
tasks.test {
useJUnitPlatform()
testLogging {
@@ -22,7 +27,6 @@ tasks.test {
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
// Task to deploy code to FTC SDK
tasks.register<Copy>("deployToSDK") {
group = "ftc"
@@ -40,7 +44,6 @@ tasks.register<Copy>("deployToSDK") {
println("✓ Code deployed to TeamCode")
}
}
// Task to build APK
tasks.register<Exec>("buildApk") {
group = "ftc"
@@ -60,4 +63,4 @@ tasks.register<Exec>("buildApk") {
doLast {
println("✓ APK built successfully")
}
}
}