Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
start autolog impl
Browse files Browse the repository at this point in the history
  • Loading branch information
doinkythederp committed Nov 21, 2024
1 parent 1cd85e9 commit ce18d5e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 31 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "team8bit"]
path = team8bit
url = https://github.com/Team-8-bit/robot-lib.git
26 changes: 15 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "1.9.22"
id "edu.wpi.first.GradleRIO" version "2024.1.1"
id "org.jetbrains.kotlin.jvm" version "2.0.21"
id "edu.wpi.first.GradleRIO" version "2024.3.2"
id "com.peterabeles.gversion" version "1.10"
id "idea"
id "com.google.devtools.ksp" version "2.0.21-1.0.25"
}

def javaVersion = JavaVersion.VERSION_17

java {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
//def javaVersion = JavaVersion.VERSION_17
//
//java {
// sourceCompatibility = javaVersion
// targetCompatibility = javaVersion
//}

def ROBOT_MAIN_CLASS = "com.frcteam3636.frc2024.Main"

Expand Down Expand Up @@ -91,6 +92,9 @@ dependencies {
implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()

implementation("org.team9432.lib:annotation")
ksp("org.team9432.lib:annotation")

roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)

Expand Down Expand Up @@ -137,16 +141,16 @@ tasks.withType(JavaCompile).configureEach {

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.@Companion.fromTarget(javaVersion.toString()))
// jvmTarget.set(JvmTarget.@Companion.fromTarget(javaVersion.toString()))
// https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support
jvmToolchain(Integer.valueOf(javaVersion.toString()))
// jvmToolchain(Integer.valueOf(javaVersion.toString()))
}
}

idea {
project {
// The project.sourceCompatibility setting is not always picked up, so we set explicitly
languageLevel = javaVersion
// languageLevel = javaVersion
}
module {
// Improve development & (especially) debugging experience (and IDEA's capabilities) by having libraries' source & javadoc attached
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ pluginManagement {
}
}
}

includeBuild "team8bit"
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,17 @@ import com.revrobotics.CANSparkLowLevel
import edu.wpi.first.math.system.plant.DCMotor
import edu.wpi.first.units.Units.*
import edu.wpi.first.wpilibj.simulation.FlywheelSim
import org.littletonrobotics.junction.AutoLog
import org.littletonrobotics.junction.LogTable
import org.littletonrobotics.junction.inputs.LoggableInputs


interface IntakeIO {
class Inputs : LoggableInputs {
@AutoLog
open class Inputs {
var rollerVelocity = RotationsPerSecond.zero()
var current = Amps.zero()
var position = Radians.zero()

override fun toLog(table: LogTable) {
table.put("Intake Velocity", rollerVelocity)
table.put("Intake Current", current)
table.put("Intake Roller Position", position)
}

override fun fromLog(table: LogTable) {
rollerVelocity = table.get("Intake Velocity", rollerVelocity)
current = table.get("Intake Current", current)
position = table.get("Intake Roller Position", position)
}

}

fun setSpeed(percent: Double)
Expand Down
1 change: 1 addition & 0 deletions team8bit
Submodule team8bit added at 4efeb1
12 changes: 6 additions & 6 deletions vendordeps/AdvantageKit.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "AdvantageKit.json",
"name": "AdvantageKit",
"version": "3.0.0",
"version": "3.2.1",
"uuid": "d820cc26-74e3-11ec-90d6-0242ac120003",
"frcYear": "2024",
"mavenUrls": [],
Expand All @@ -10,24 +10,24 @@
{
"groupId": "org.littletonrobotics.akit.junction",
"artifactId": "wpilib-shim",
"version": "3.0.0"
"version": "3.2.1"
},
{
"groupId": "org.littletonrobotics.akit.junction",
"artifactId": "junction-core",
"version": "3.0.0"
"version": "3.2.1"
},
{
"groupId": "org.littletonrobotics.akit.conduit",
"artifactId": "conduit-api",
"version": "3.0.0"
"version": "3.2.1"
}
],
"jniDependencies": [
{
"groupId": "org.littletonrobotics.akit.conduit",
"artifactId": "conduit-wpilibio",
"version": "3.0.0",
"version": "3.2.1",
"skipInvalidPlatforms": false,
"isJar": false,
"validPlatforms": [
Expand All @@ -39,4 +39,4 @@
}
],
"cppDependencies": []
}
}

0 comments on commit ce18d5e

Please sign in to comment.