You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the AutoLog decorator I'm not seeing the classes it's supposed to generate. I have this in my build.gradle, which looks like it's supposed to set up autolog:
While I don't have a lot of experience with Kotlin, my understanding is that Java annotation processors aren't compatible with Kotlin code. Kotlin has alternative annotation processing systems (Kapt and KSP), which have different APIs. Unfortunately, that means you'll need to write the toLog and fromLog methods on the inputs class manually. As far as I know, all of the other standard features of AdvantageKit are compatible with Kotlin.
camearle20
changed the title
How do I set up AutoLog class generation?
AutoLog Annotation Kotlin Support
Jan 17, 2024
In addition, while browsing code online, I found this really cool kotlin AutoLog implementation from 9432. We personally use a custom implementation that's slightly different than the loggable inputs model of advantagekit, but for most teams, this probably does the job.
Note: this implementation doesn't include implementations for Pose2d and the Translation/Transform classes, as well as wpilib's unit system. You also need to mark the class as open in order for it to be extendable.
When using the AutoLog decorator I'm not seeing the classes it's supposed to generate. I have this in my
build.gradle
, which looks like it's supposed to set up autolog:Here's the AutoLog code:
I've checked the
build/
folder for the classes, but I don't see anything. Building also fails becauseIntakeInputsAutoLogged
doesn't exist.Here's the setup I'm using:
The text was updated successfully, but these errors were encountered: